/* ===========================
   FEEDBACK PAGE
=========================== */

.feedback-container {
    min-height: calc(100vh - 70px);
    padding: 40px 35px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}


.feedback-card {
    width: 100%;

    /* fills the page like the admin cards */
    max-width: none;

    background: white;

    border-radius: 20px;

    padding: 32px;

    box-shadow:
        0 8px 30px
        rgba(0, 0, 0, 0.08);
}


/* ===========================
   HEADER
=========================== */

.feedback-header {
    display: flex;
    align-items: center;
    gap: 16px;

    margin-bottom: 24px;
}


.feedback-header-icon {
    width: 54px;
    height: 54px;

    border-radius: 15px;

    background: #4c6b54;
    color: white;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 25px;
}


.feedback-header h1 {
    margin: 0;

    color: #304a39;

    font-size: 30px;
}


.feedback-header p {
    margin: 4px 0 0;

    color: #777;
}


/* ===========================
   INFORMATION
=========================== */

.feedback-info {
    display: flex;
    gap: 12px;

    background: #f1f6f2;

    border: 1px solid #d7e2da;

    border-radius: 12px;

    padding: 15px;

    margin-bottom: 28px;

    color: #405d48;
}


.feedback-info i {
    margin-top: 3px;
}


.feedback-info p {
    margin: 0;

    line-height: 1.6;
}


/* ===========================
   FORM
=========================== */

.form-group {
    margin-bottom: 24px;
}


.form-group label {
    display: block;

    font-weight: 600;

    color: #304a39;

    margin-bottom: 8px;
}


.form-group label i {
    margin-right: 6px;
}


.form-group select,
.form-group textarea {
    box-sizing: border-box;

    width: 100%;

    border: 1px solid #cbd8ce;

    border-radius: 12px;

    padding: 13px 14px;

    font: inherit;

    background: white;

    color: #333;

    outline: none;
}


.form-group select:focus,
.form-group textarea:focus {
    border-color: #4c6b54;

    box-shadow:
        0 0 0 3px
        rgba(76, 107, 84, 0.12);
}


.form-group textarea {
    resize: vertical;

    min-height: 150px;
}


.form-group small {
    display: block;

    margin-top: 7px;

    color: #777;

    font-size: 14px;
}


/* ===========================
   SELECTED TRIP
=========================== */

.selected-trip {
    margin-bottom: 26px;

    border: 1px solid #d7e2da;

    background: #fafcf9;

    border-radius: 15px;

    padding: 20px;
}


.selected-trip-title {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #405d48;

    font-weight: 600;

    margin-bottom: 18px;
}


.trip-route {
    display: flex;
    flex-direction: column;

    gap: 6px;
}


.trip-label {
    display: block;

    color: #888;

    font-size: 14px;

    margin-bottom: 3px;
}


.trip-route strong {
    display: block;

    color: #304a39;

    overflow-wrap: anywhere;
}


.route-arrow {
    color: #4c6b54;

    padding-left: 4px;
}


.trip-details {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 10px;

    margin-top: 18px;

    padding-top: 18px;

    border-top:
        1px solid #d7e2da;
}


.trip-details div {
    min-width: 0;
}


.trip-details span {
    display: block;

    color: #888;

    font-size: 13px;

    margin-bottom: 4px;
}


.trip-details strong {
    color: #304a39;

    font-size: 15px;
}


/* ===========================
   CHARACTER COUNT
=========================== */

.message-footer {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    align-items: center;
}


.message-footer small {
    margin: 0;
}


#characterCount {
    font-size: 14px;

    white-space: nowrap;

    color: #777;
}


/* ===========================
   NOTICE
=========================== */

.feedback-notice {
    min-height: 22px;

    margin-bottom: 14px;

    font-size: 16px;

    line-height: 1.5;
}


.feedback-notice.success {
    color: #287044;
}


.feedback-notice.error {
    color: #b23a3a;
}


/* ===========================
   BUTTON
=========================== */

.submit-feedback-btn {
    width: 100%;

    border: none;

    border-radius: 12px;

    padding: 14px 20px;

    background: #4c6b54;

    color: white;

    font: inherit;

    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.2s,
        opacity 0.2s;
}


.submit-feedback-btn:hover {
    transform: translateY(-1px);
}


.submit-feedback-btn:disabled {
    opacity: 0.6;

    cursor: not-allowed;

    transform: none;
}


/* ===========================
   NO TRIPS
=========================== */

.no-trips {
    text-align: center;

    padding: 35px 15px;
}


.no-trips i {
    font-size: 53px;

    color: #4c6b54;

    margin-bottom: 14px;
}


.no-trips h2 {
    color: #304a39;

    margin-bottom: 8px;
}


.no-trips p {
    color: #777;

    margin-bottom: 20px;
}


.no-trips a {
    display: inline-block;

    background: #4c6b54;

    color: white;

    text-decoration: none;

    padding: 11px 18px;

    border-radius: 10px;
}


/* ===========================
   MOBILE
=========================== */

@media (max-width: 650px) {

    .feedback-container {
        padding: 20px 12px;
    }


    .feedback-card {
        padding: 22px 16px;

        border-radius: 15px;
    }


    .feedback-header h1 {
        font-size: 25px;
    }


    .trip-details {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .message-footer {
        align-items: flex-start;

        flex-direction: column;
    }
}

/* ===========================================================
   BRAND ASSETS (logo mark + wordmark)
   White versions sit on the green sidebar,
   green versions sit on the white top bar.
=========================================================== */

.sidebar-logo,
.admin-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sidebar-logo .brand-icon,
.admin-logo .brand-icon {
    width: 54px;
    height: auto;
    display: block;
}

.sidebar-logo .brand-name,
.admin-logo .brand-name {
    width: 140px;
    max-width: 100%;
    height: auto;
    display: block;
}

header .logo,
.top-bar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

header .logo .brand-icon,
.top-bar .logo .brand-icon {
    width: 34px;
    height: auto;
    display: block;
}

header .logo .brand-name,
.top-bar .logo .brand-name {
    width: 120px;
    height: auto;
    display: block;
}


/* ===========================================================
   TYPEFACE — Signika (Google Fonts, OFL)
   Loaded via <link> in each page head.
=========================================================== */

html,
body,
button,
input,
select,
textarea {
    font-family: 'Signika Negative', 'Segoe UI', Tahoma, sans-serif;

    /* SemiBold is the base weight for this design */
    font-weight: 600;
}

/* Optional photos (up to 3) */
.optional-tag {
    font-weight: 400;
    opacity: 0.75;
    font-size: 0.9em;
}

.photo-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.photo-previews {
    display: contents;
}

.photo-preview {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d8e3db;
    background: #f1f6f2;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
}

.photo-add {
    width: 88px;
    height: 88px;
    border: 2px dashed #9dbba6;
    border-radius: 12px;
    background: #f6faf7;
    color: #2d5a3d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.photo-add[hidden] {
    display: none;
}

.photo-add:hover {
    background: #e9f3ec;
}

.photo-add i {
    font-size: 20px;
}

.photo-hint {
    display: block;
    margin-top: 8px;
    opacity: 0.8;
}

/* bigger photo boxes; beats ".form-group label" so the + and text stay centered */
.photo-picker .photo-preview,
.photo-picker .photo-add {
    width: 120px;
    height: 120px;
}

.photo-picker .photo-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    font-size: 14px;
    box-sizing: border-box;
}

.photo-picker .photo-add[hidden] {
    display: none;
}

.photo-picker .photo-add i {
    margin: 0;
    font-size: 26px;
}

@media (max-width: 480px) {
    .photo-picker .photo-preview,
    .photo-picker .photo-add {
        width: 96px;
        height: 96px;
    }
}

/* =====================================
   SAVED REPORT RECEIPTS
===================================== */

.report-history {
    margin: 26px auto 45px;
    padding: 28px;
    max-width: 850px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(20, 39, 56, .06);
}

.report-history[hidden],
.report-more[hidden] {
    display: none !important;
}

.report-history-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.report-history-heading h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    color: #173b38;
}

.report-history-heading p {
    margin: 0;
    color: #64748b;
}

/* Buttons */

.report-refresh,
.report-more {
    cursor: pointer;
    border: 1px solid #0e7667;
    border-radius: 10px;
    background: #fff;
    color: #0e7667;
    padding: 10px 16px;
    font-weight: 600;
}

.report-refresh:hover,
.report-more:hover {
    background: #effaf7;
}

/* History message */

.report-history-message {
    color: #64748b;
    font-size: .91rem;
    margin: 18px 0 12px;
}

/* Receipt list */

.report-history-list {
    display: grid;
    gap: 14px;
}

/* Individual receipt */

.report-receipt {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fafdfc;
}

.report-receipt-top {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.report-receipt-top strong {
    color: #193c38;
}

/* Email status */

.report-email-status {
    border-radius: 50px;
    padding: 5px 10px;
    font-size: .78rem;
    background: #f1f5f9;
    color: #475569;
}

.report-email-status.sent {
    color: #176346;
    background: #dcfce7;
}

.report-email-status.failed {
    color: #9f1239;
    background: #ffe4e6;
}

/* Receipt information */

.report-receipt-date {
    font-size: .83rem;
    color: #64748b;
    margin: 9px 0;
}

.report-receipt-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
    margin: 12px 0;
    color: #334155;
}

.report-receipt-ref {
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
    font-size: .8rem;
    overflow-wrap: anywhere;
    color: #64748b;
}

.report-more {
    display: block;
    margin: 18px auto 0;
}

/* Mobile responsive */

@media (max-width: 600px) {
    .report-history {
        padding: 18px;
        margin: 20px 10px 35px;
    }
}

/* One feedback submission per travel-history entry */

.trip-report-limit-notice {
    margin: 8px 0 12px;
    color: #47615c;
    font-size: .87rem;
    line-height: 1.5;
}

/* =====================================
   FEEDBACK PAGE LAYOUT
===================================== */

/* Stack form and history vertically */

.feedback-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 56px;
}

/* Make both sections use the full width */

.feedback-container > .feedback-card,
.feedback-container > .report-history {
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}


/* =====================================
   REPORT HISTORY SPACING
===================================== */

.report-history {
    padding: 28px 32px;
}

/* Show receipts in two columns */

.report-history-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

/* Individual report cards */

.report-receipt {
    min-width: 0;
    padding: 20px;
}

.report-receipt-ref {
    font-size: .79rem;
}


/* =====================================
   EDIT REPORT BUTTONS
===================================== */

.report-edit-button,
.report-save-button,
.report-cancel-button {
    cursor: pointer;
    padding: 9px 14px;
    border-radius: 9px;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
}

/* Edit report button */

.report-edit-button {
    margin-top: 14px;
    border: 1px solid #147b69;
    background: #fff;
    color: #146f60;
}

/* Save changes button */

.report-save-button {
    border: 1px solid #13745f;
    background: #13745f;
    color: white;
}

/* Cancel button */

.report-cancel-button {
    border: 1px solid #cbd5e1;
    background: white;
    color: #334155;
}


/* =====================================
   EDIT REPORT FORM
===================================== */

.report-edit-area {
    margin-top: 12px;
}

/* Hide inactive editing elements */

.report-edit-area[hidden],
.report-edit-button[hidden] {
    display: none !important;
}

/* Edit textarea */

.report-edit-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #b9ccc4;
    border-radius: 9px;
    font: inherit;
    resize: vertical;
}

/* Save and Cancel button layout */

.report-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* Editing information */

.report-edit-help,
.report-edit-notice {
    color: #52675f;
    font-size: .85rem;
    margin: 7px 0;
}

.report-edit-notice {
    overflow-wrap: anywhere;
}


/* =====================================
   RESPONSIVE DESIGN
===================================== */

/* One receipt per row on smaller screens */

@media (max-width: 800px) {
    .report-history-list {
        grid-template-columns: 1fr;
    }
}

/* Mobile spacing */

@media (max-width: 600px) {

    .feedback-container {
        padding: 20px 12px 35px;
        gap: 18px;
    }

    .feedback-container > .feedback-card,
    .feedback-container > .report-history {
        padding: 19px;
        border-radius: 14px;
        margin: 0;
    }
}

/* =====================================================
   PHONE VIEW: My Profile, Travel History and Feedback &
   Report share one card size, and the card fills the screen
===================================================== */
@media (max-width: 700px) {

    .feedback-container {
        min-height: 0;
        padding: 0 12px 12px;
        gap: 12px;
        align-items: stretch;
    }

    .feedback-container > .feedback-card,
    .feedback-container > .report-history {
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        margin: 0;
        padding: 16px 16px 24px;
        border-radius: 18px;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    }

    .feedback-container > .feedback-card {
        min-height: calc(100vh - 75px);
        min-height: calc(100dvh - 75px);
    }
}
