/* ==========================================================
   My Webinars for WooCommerce — Styles v2
   ========================================================== */

/* ----------------------------------------------------------
   SECTION WRAPPER
   ---------------------------------------------------------- */
.mwwc-section {
    margin-bottom: 30px;
}

.mwwc-section h2 {
    font-size: 22px !important;
    color: #222 !important;
    margin: 0 0 20px !important;
    padding-bottom: 10px;
    border-bottom: 2px solid #e6545d;
    line-height: 1.3;
}

.mwwc-empty {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 15px;
}

/* ----------------------------------------------------------
   INLINE VIDEO PLAYER
   ---------------------------------------------------------- */
.mwwc-video-player {
    margin: 12px 0;
}

.mwwc-video-inline {
    width: 100%;
    border-radius: 8px;
    display: block;
    background: #000;
}

/* ----------------------------------------------------------
   VIDEOS GRID  (Мої відео)
   ---------------------------------------------------------- */
.mwwc-video-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 4px 0;
}

/* Card */
.mwwc-video-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mwwc-video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Cover image */
.mwwc-card-cover {
    width: 100%;
    overflow: hidden;
    background: #f2f2f2;
    flex-shrink: 0;
}

.mwwc-card-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.mwwc-card-cover--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fce4e6, #e3f2fd);
    height: 180px;
}

.mwwc-card-cover--placeholder::after {
    content: "▶";
    font-size: 52px;
    color: #e6545d;
    opacity: 0.4;
}

/* Card body */
.mwwc-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mwwc-card-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 12px !important;
    line-height: 1.4 !important;
}

/* Meta (date + access) */
.mwwc-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.mwwc-meta-item {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
}

.mwwc-meta-label {
    font-weight: 600;
    color: #555;
}

.mwwc-meta-access {
    font-style: italic;
}

/* Watch button */
.mwwc-btn--watch {
    display: block;
    text-align: center;
    padding: 11px 16px;
    background: #e6545d;
    color: #fff !important;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: background 0.2s ease;
    border: none;
    cursor: pointer;
}

.mwwc-btn--watch:hover {
    background: #c93840;
    color: #fff !important;
}

/* Materials section inside video card */
.mwwc-card-materials {
    margin-top: 16px;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.mwwc-materials-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #aaa;
    margin-bottom: 8px;
}

.mwwc-materials-header .mwwc-count {
    font-weight: 400;
}

/* Compact materials table (inside video card) */
.mwwc-materials-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.mwwc-materials-table tr {
    border-bottom: 1px solid #f5f5f5;
}

.mwwc-materials-table tr:last-child {
    border-bottom: none;
}

.mwwc-materials-table td {
    padding: 6px 4px;
    vertical-align: middle;
}

.mwwc-materials-table td:first-child {
    width: 42px;
}

.mwwc-materials-table td:last-child {
    width: 34px;
    text-align: right;
}

.mwwc-materials-table .mwwc-file-name-cell {
    color: #444;
    word-break: break-word;
}

/* Actual filename below the custom download name */
.mwwc-file-actual {
    display: block;
    font-size: 11px;
    color: #bbb;
    font-style: normal;
    margin-top: 2px;
    word-break: break-all;
    font-weight: 400;
}

/* Small download icon button */
.mwwc-btn--download-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f0f0f0;
    color: #555 !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 15px;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1;
}

.mwwc-btn--download-sm:hover {
    background: #e6545d;
    color: #fff !important;
}

/* ----------------------------------------------------------
   FILE TYPE BADGES
   ---------------------------------------------------------- */
.mwwc-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #eee;
    color: #666;
    white-space: nowrap;
}

.mwwc-badge--pdf  { background: #fdecea; color: #c0392b; }
.mwwc-badge--doc,
.mwwc-badge--docx { background: #e8f0fe; color: #1967d2; }
.mwwc-badge--xls,
.mwwc-badge--xlsx { background: #e6f4ea; color: #137333; }
.mwwc-badge--ppt,
.mwwc-badge--pptx { background: #fff3e0; color: #e37400; }
.mwwc-badge--zip,
.mwwc-badge--rar  { background: #f3e8fd; color: #8430ce; }
.mwwc-badge--mp4,
.mwwc-badge--mov  { background: #e3f2fd; color: #0089bf; }
.mwwc-badge--jpg,
.mwwc-badge--jpeg,
.mwwc-badge--png  { background: #f0fdf4; color: #16a34a; }

/* ----------------------------------------------------------
   MATERIALS LIST  (Мої матеріали)
   ---------------------------------------------------------- */
.mwwc-materials-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Materials card */
.mwwc-materials-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Card header */
.mwwc-materials-card__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.mwwc-materials-card__thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #eee;
}

.mwwc-materials-card__info h3 {
    margin: 0 0 4px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    line-height: 1.3;
}

.mwwc-materials-card__info .mwwc-date {
    font-size: 13px;
    color: #999;
    font-style: italic;
}

/* Card body */
.mwwc-materials-card__body {
    overflow-x: auto;
}

/* Full materials table */
.mwwc-materials-table--full {
    width: 100%;
    border-collapse: collapse;
    min-width: 400px;
}

.mwwc-materials-table--full thead th {
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #aaa;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.mwwc-materials-table--full tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
    font-size: 14px;
    color: #333;
}

.mwwc-materials-table--full tbody tr:last-child td {
    border-bottom: none;
}

.mwwc-materials-table--full tbody tr:hover td {
    background: #fafafa;
}

.mwwc-materials-table--full .mwwc-col-type {
    width: 60px;
    white-space: nowrap;
}

.mwwc-materials-table--full .mwwc-col-action {
    width: 150px;
    text-align: right;
    white-space: nowrap;
}

.mwwc-materials-table--full .mwwc-file-name-cell {
    word-break: break-word;
}

/* Download button in full table */
.mwwc-btn--download {
    display: inline-block;
    padding: 7px 14px;
    background: #0089bf;
    color: #fff !important;
    border-radius: 7px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.mwwc-btn--download:hover {
    background: #006d99;
    color: #fff !important;
}

/* ----------------------------------------------------------
   MY WEBINARS section  (Мої вебінари — live links)
   ---------------------------------------------------------- */
.my-webinars-section {
    margin-bottom: 30px;
}

.my-webinars-section h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #222;
    padding-bottom: 10px;
    border-bottom: 2px solid #e6545d;
}

.webinar-item {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.webinar-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.webinar-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.webinar-info {
    font-size: 13px;
    color: #777;
    margin-bottom: 12px;
    font-style: italic;
}

.webinar-link {
    display: inline-block;
    padding: 9px 18px;
    background: #e6545d;
    color: #fff !important;
    border-radius: 7px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s ease;
}

.webinar-link:hover {
    background: #c93840;
    color: #fff !important;
}

.webinar-notice {
    display: inline-block;
    padding: 8px 16px;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    color: #888;
    font-size: 13px;
    font-style: italic;
}

/* ----------------------------------------------------------
   NAVIGATION ICON  (Мої відео)
   ---------------------------------------------------------- */
.woocommerce-MyAccount-navigation-link--my-videos a::before {
    content: "\f236";
    font-family: dashicons;
    margin-right: 5px;
    vertical-align: middle;
}

/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 900px) {
    .mwwc-video-grid {
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .mwwc-video-grid {
        gap: 14px;
    }

    .mwwc-section h2 {
        font-size: 19px !important;
    }

    .mwwc-materials-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mwwc-materials-table--full .mwwc-col-action {
        width: auto;
    }

    .mwwc-btn--download {
        padding: 6px 10px;
        font-size: 12px;
    }

    .webinar-title {
        font-size: 15px;
    }
}

/* ----------------------------------------------------------
   MY ACCOUNT — HIDE THEME BREADCRUMBS & PAGE TITLE
   ---------------------------------------------------------- */
.woocommerce-account .td-crumb-container,
.woocommerce-account .td-page-header {
    display: none;
}

/* ----------------------------------------------------------
   MY ACCOUNT — HORIZONTAL TAB NAVIGATION
   ---------------------------------------------------------- */

/* Stack nav above content (override WC default float/sidebar layout) */
.woocommerce-account .woocommerce-MyAccount-navigation {
    float: none !important;
    width: 100% !important;
    margin-bottom: 28px;
}

.woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
}

/* Nav list → horizontal flex row with bottom border */
.woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 2px solid #e6545d;
}

/* Reset default li margins/padding */
.woocommerce-MyAccount-navigation-link {
    margin: 0 !important;
    padding: 0 !important;
}

/* Each link → tab button (sits on the border-bottom line) */
.woocommerce-MyAccount-navigation-link a {
    display: inline-block;
    padding: 10px 18px;
    background: #f5f5f5;
    color: #555 !important;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    position: relative;
    bottom: -2px;
}

.woocommerce-MyAccount-navigation-link a:hover {
    background: #fde8e9;
    color: #e6545d !important;
    border-color: #e6545d;
}

/* Active tab */
.woocommerce-MyAccount-navigation-link.is-active a {
    background: #e6545d;
    color: #fff !important;
    border-color: #e6545d;
}

/* Logout link — pushed to the far right, styled subtly */
.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-left: auto !important;
}

.woocommerce-MyAccount-navigation-link--customer-logout a {
    background: transparent;
    border-color: transparent;
    color: #aaa !important;
    font-weight: 400;
    font-style: italic;
}

.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    background: transparent;
    border-color: transparent;
    color: #e6545d !important;
}

/* Responsive: stack tabs vertically on small screens */
@media (max-width: 600px) {
    .woocommerce-MyAccount-navigation ul {
        flex-direction: column;
        gap: 4px;
        border-bottom: none;
    }

    .woocommerce-MyAccount-navigation-link a {
        display: block;
        border-radius: 8px;
        border: 1px solid #e0e0e0;
        bottom: 0;
    }

    .woocommerce-MyAccount-navigation-link.is-active a {
        border-color: #e6545d;
    }

    .woocommerce-MyAccount-navigation-link--customer-logout {
        margin-left: 0 !important;
        margin-top: 8px !important;
    }
}
