/*
 * VFE My Account Premium Styles
 */

:root {
    --vfe-accent: #1a2b3c;
    --vfe-bg-light: #f8fafc;
    --vfe-border: #e2e8f0;
    --vfe-text-main: #1e293b;
    --vfe-text-muted: #64748b;
    --vfe-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --vfe-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Sidebar Navigation */
.woocommerce-MyAccount-navigation {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--vfe-shadow);
    border: 1px solid var(--vfe-border);
    margin-bottom: 30px;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation ul li {
    margin-bottom: 8px;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 18px;
    color: var(--vfe-text-main);
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.woocommerce-MyAccount-navigation ul li:hover,
.woocommerce-MyAccount-navigation ul li.is-active {
    background: var(--vfe-accent) !important;
}

.woocommerce-MyAccount-navigation ul li:hover a,
.woocommerce-MyAccount-navigation ul li.is-active a {
    color: #fff !important;
}

/* Overview / Dashboard */
.vfe-myaccount-header {
    margin-bottom: 40px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    padding: 50px 40px !important;
    border-radius: 20px;
    color: #fff !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.vfe-myaccount-header::after {
    content: '';
    position: absolute;
    right: -50px;
    top: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.vfe-myaccount-header h2 {
    color: #fff !important;
    margin: 0 0 15px 0 !important;
    font-size: 36px !important;
    font-weight: 800 !important;
    line-height: 1.2;
}

.vfe-myaccount-header p {
    margin: 0 !important;
    font-size: 17px !important;
    opacity: 0.95;
    color: #fff !important;
    line-height: 1.6;
    background: transparent !important;
    /* Prevent theme from adding box */
    padding: 0 !important;
    border: none !important;
}

/* Hide standard WC welcome text on dashboard */
.woocommerce-MyAccount-content>p:not([class]),
.woocommerce-MyAccount-content>p:first-of-type,
.woocommerce-MyAccount-content>p:nth-of-type(2) {
    display: none !important;
}

/* Booking Cards */
.vfe-booking-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.vfe-booking-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--vfe-border);
    box-shadow: var(--vfe-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.vfe-booking-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--vfe-shadow-lg);
}

.vfe-booking-card-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--vfe-border);
    background: #fdfdfd;
}

.vfe-booking-id {
    font-weight: 700;
    color: var(--vfe-accent);
    font-size: 14px;
    text-transform: uppercase;
}

.vfe-booking-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-confirmed {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fef9c3;
    color: #854d0e;
}

.status-paid {
    background: #dcfce7;
    color: #166534;
}

.status-unpaid {
    background: #fee2e2;
    color: #991b1b;
}

.vfe-booking-card-body {
    padding: 20px;
    display: flex;
    gap: 20px;
}

.vfe-booking-image {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 160px;
    flex-shrink: 0;
}

.vfe-booking-thumb {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    object-fit: cover;
}

.vfe-btn-unterkunft {
    display: block;
    text-align: center;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none !important;
    border: 1.5px solid var(--vfe-accent);
    color: var(--vfe-accent) !important;
    transition: background 0.2s, color 0.2s;
}

.vfe-btn-unterkunft:hover {
    background: var(--vfe-accent);
    color: #fff !important;
}

.vfe-booking-details h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--vfe-text-main);
}

.vfe-booking-meta {
    font-size: 14px;
    color: var(--vfe-text-muted);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
}

.vfe-booking-meta .label {
    font-weight: 600;
    color: var(--vfe-text-main);
}

.vfe-booking-meta .vfe-booking-address {
    word-break: break-word;
}

.vfe-booking-card-footer {
    padding: 15px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--vfe-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vfe-booking-price {
    font-weight: 800;
    font-size: 20px;
    color: var(--vfe-text-main);
}

.vfe-booking-actions {
    display: flex;
    gap: 10px;
}

.vfe-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vfe-btn-outline {
    border: 1.5px solid var(--vfe-accent);
    color: var(--vfe-accent);
}

.vfe-btn-outline:hover {
    background: var(--vfe-accent);
    color: #fff;
}

.vfe-btn-primary {
    background: var(--vfe-accent);
    color: #fff;
}

.vfe-btn-primary:hover {
    background: #2c3e50;
    transform: scale(1.05);
}

/* Hide standard orders tab in menu */
.woocommerce-MyAccount-navigation-link--orders {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .vfe-booking-card-body {
        flex-direction: column;
    }

    .vfe-booking-image {
        width: 100%;
    }

    .vfe-booking-thumb {
        width: 100%;
        height: 150px;
    }

    .vfe-booking-card-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .vfe-booking-actions {
        width: 100%;
    }

    .vfe-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Document Icons & Labels */
.vfe-btn b {
    color: #fff;
    background: var(--vfe-accent);
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 9px;
    margin-right: 6px;
    text-transform: uppercase;
    vertical-align: middle;
}

.vfe-btn-outline:hover b {
    background: #fff;
    color: var(--vfe-accent);
}

/* Hide Orders in Menu Hook */
.woocommerce-MyAccount-navigation-link--orders {
    display: none !important;
}

/* Content Area Spacing */
.woocommerce-MyAccount-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

/* Single Booking Detail View */
.woocommerce-MyAccount-content h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--vfe-accent);
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.woocommerce-MyAccount-content p {
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 4px solid var(--vfe-accent);
    color: var(--vfe-text-muted);
    font-size: 15px;
    margin-bottom: 30px;
}

.woocommerce-MyAccount-content p mark {
    background: transparent;
    color: var(--vfe-accent);
    font-weight: 700;
}

/* Shop Table (YITH Details) */
table.shop_table.booking_details {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--vfe-border);
    border-radius: 15px;
    overflow: hidden;
}

table.shop_table.booking_details th,
table.shop_table.booking_details td {
    padding: 18px 25px;
    border-bottom: 1px solid var(--vfe-border);
    text-align: left;
}

table.shop_table.booking_details tr:last-child th,
table.shop_table.booking_details tr:last-child td {
    border-bottom: none;
}

table.shop_table.booking_details th {
    background: #fbfcfe;
    color: var(--vfe-text-main);
    font-weight: 700;
    width: 35%;
}

table.shop_table.booking_details td {
    color: var(--vfe-text-muted);
}

/* Document Container in Detail View */
.vfe-detail-documents {
    margin-top: 35px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 15px;
    border: 1px solid var(--vfe-border);
}

.vfe-detail-documents h4 {
    margin: 0 0 20px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--vfe-text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.vfe-detail-documents .vfe-document-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.vfe-detail-documents .vfe-btn {
    padding: 12px 20px;
    justify-content: center;
    font-size: 14px;
}

/* Booking Actions (Default YITH) */
.woocommerce-MyAccount-content .yith-wcbk-booking-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.woocommerce-MyAccount-content .yith-wcbk-booking-actions a {
    background: #fff;
    border: 1.5px solid var(--vfe-border);
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--vfe-text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.woocommerce-MyAccount-content .yith-wcbk-booking-actions a:hover {
    border-color: var(--vfe-accent);
    color: var(--vfe-accent);
    transform: translateY(-2px);
}

/* Fix YITH View Button Alignment - Back to robust vertical centering */
.yith-wcbk-booking-list-table td.actions {
    vertical-align: middle !important;
    text-align: right !important;
}

.yith-wcbk-booking-list-table td.actions .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    float: none !important;
    margin: 0 !important;
    height: 38px !important;
    /* Standardized height */
    vertical-align: middle !important;
    line-height: 1 !important;
}

.yith-wcbk-booking-list-table tr td {
    vertical-align: middle !important;
    height: auto !important;
    padding: 15px 10px !important;
}