/* TOTL User Profile - Modern Style
   Version: 1.0
   Colors: Primary #6366f1 (indigo), accent #10b981 (emerald), neutral grays
*/

/* =============================================
   Reset / Base
============================================= */
.totl-user-profile * {
    box-sizing: border-box;
}

.totl-user-profile {
    font-family: system-ui, -apple-system, BlinkMacOS, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    color: #1f2937;
}

/*registration and login forms*/
.totl-login-form-wrapper,
.totl-registration-form-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.totl-input {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.totl-button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.totl-button:hover {
    background: #0056b3;
}

.totl-form-error {
    color: red;
    margin-bottom: 15px;
}

.totl-form-success {
    color: green;
    margin-bottom: 15px;
}

.required {
    color: red;
}

/* =============================================
   Dropdown Menu - My Account
============================================= */
.my-account-dropdown {
    position: relative;
    display: inline-block;
}

.my-account-dropdown .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f2f2fe;
    padding: 5px 15px 5px 15px;
	border-radius: 6px;
    font-size: 14px;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
	font-weight:500;
}

/* .my-account-dropdown .dropdown-toggle:hover,
.my-account-dropdown .dropdown-toggle:focus {
    background: #f3f4f6;
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
} */

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.my-account-dropdown:hover .dropdown-menu,
.my-account-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a,
.dropdown-menu .user-name {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #29303B;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.15s;
}

.dropdown-menu .user-name {
    font-weight: 600;
    color: #8cc500;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.25rem;
    pointer-events: none;
}

.dropdown-menu a:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Logout – red accent */
.dropdown-menu a[href*="wp-logout"] {
    color: #dc2626;
}

.dropdown-menu a[href*="wp-logout"]:hover {
    background: #fee2e2;
}


/* =============================================
   Course & Certificate Grid
============================================= */
.courses-grid,
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.course-item,
.certificate-item {
    background: white;
    overflow: hidden;
	border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
	display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.course-item:hover,
.certificate-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.course-item img,
.certificate-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.course-item h3,
.certificate-item h3 {
    margin: 0;
    padding: 1.25rem 1.25rem 0.75rem;
    font-size: 15px;
    line-height: 1.4;
}

.course-item h3 a,
.certificate-item h3 a {
    color: #1f2937;
    text-decoration: none;
}

.course-item h3 a:hover {
    color: #6366f1;
}

.course-item p,
.certificate-item p {
    margin: 0;
    padding: 0 1.25rem 1.25rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.download-btn {
    display: inline-block;
    margin: 0 1.25rem 1.25rem;
    padding: 0.65rem 1.25rem;
    background-image: linear-gradient(to left, #b4e100, #8cc500) !important;
    color: white;
    font-weight: 500;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.download-btn:hover {
    background-image: linear-gradient(to right, #b4e100, #8cc500) !important;
	color: white;
}

/* =============================================
   My Account Page
============================================= */
.my-account-info {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.my-account-info p {
    margin: 1rem 0;
    font-size: 1.05rem;
}

.my-account-info strong {
    color: #374151;
}

.my-account-info h3 {
    margin: 2rem 0 1rem;
    color: #1f2937;
    font-size: 1.4rem;
}

.my-account-info form {
    display: grid;
    gap: 1rem;
    max-width: 420px;
}

.my-account-info input[type="password"],
.my-account-info input[type="text"],
.my-account-info input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
	border: 1px solid rgba(0, 0, 0, .1)!important;
    border-radius: 10px!important;
    font-size: 1rem;
}

.my-account-info input[type="submit"],
.my-account-info button {
    padding: 0.85rem 1.5rem;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.my-account-info input[type="submit"]:hover {
    background: #4f46e5;
}
.my-account-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.account-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.account-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #34d399;
}

.account-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.totl-profile-form, .totl-password-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #374151;
}

.form-group input {
    padding: 0.75rem 1rem;
	border: 1px solid rgba(0, 0, 0, .1)!important;
    border-radius: 10px!important;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .half {
    flex: 1;
}
.email-group {
	width: 93% !important;
    margin: auto;
}
small {
    font-size: 0.85rem;
    color: #6b7280;
}

.form-actions {
    margin-top: 1.5rem;
}

.button-primary, .button-secondary {
    padding: 0.85rem 1.8rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.button-primary {
    background: #6366f1;
    color: white;
}

.button-primary:hover {
    background: #4f46e5;
}

.button-secondary {
    background: #6b7280;
    color: white;
}

.button-secondary:hover {
    background: #4b5563;
}

hr {
    border: none;
    border-top: 1px solid #e5e7eb;
}

.my-account-tabs {
    max-width: 720px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.tabs-nav {
    display: flex;
    background: #f8f9ff;
}

.tab-link {
    flex: 1;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-link.active,
.tab-link:hover {
	background: #E7E7FF;
    color: #29303b;
}

.tabs-content {
    padding: 2rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group.half {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input:focus {
    border-color: #2f57ef;
    box-shadow: 0 0 0 3px rgba(47, 87, 239, 0.1);
}

.form-actions {
    margin-top: 2rem;
    text-align: right;
}
input.button-primary {
    background-image: linear-gradient(to left, #b4e100, #8cc500)!important;	
}
.form-actions input[type='submit'] {
    background-image: linear-gradient(to left, #b4e100, #8cc500)!important;	
	color: #fff;
    border: none;
    padding: 0.9rem 1.8rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.button-primary {
	color: #fff;
    background-image: linear-gradient(to left, #b4e100, #8cc500);
    border: none;
    padding: 0.9rem 1.8rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.button-primary:hover {
    background-image: linear-gradient(to right, #b4e100, #8cc500);
}

.button-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.9rem 1.8rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.account-message {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}

.account-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #34d399;
}

.account-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

small {
    font-size: 0.85rem;
    color: #6b7280;
}

/* =============================================
   Order History Table
============================================= */
/* Order History Table - Modern & Clean Styling */

table th {
	border: 0px solid #ebebee!important;
}
.order-history-table {
    width: 100%;
    border-spacing: 0 8px;          /* space between rows */
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 1.5rem;
}

.order-history-table thead tr th {
    background: #2f57ef21;          /* light blue background as requested */
    font-weight: 600;
    font-size: 14px;
    color: #1e3a8a;                 /* darker blue for contrast */
    text-align: left;
    padding: 5px 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-history-table thead tr th:first-child {
    border-top-left-radius: 12px;
}

.order-history-table thead tr th:last-child {
    border-top-right-radius: 12px;
}

.order-history-table tbody tr {
    border: 0px !important;         /* no borders between rows */
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.order-history-table td {
    vertical-align: middle;
    font-size: 15px;
    color: #374151;
    border: none;
}

/* Status Badges - exactly as requested */
.order-history-table .order-status {
	padding: 5px 5px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    text-align: center;
    align-items: center;
    display: ruby;
}

/* Specific status colors */
.order-history-table .order-status.completed,
.order-history-table .order-status.success,
.order-history-table .order-status.processing-success {  /* fallback names */
    color: #3eb75e;
    background-color: #3eb75e10;
}

.order-history-table .order-status.processing,
.order-history-table .order-status.on-hold {
    color: #2f57ef;
    background-color: #2f57ef21;
}

.order-history-table .order-status.cancelled,
.order-history-table .order-status.canceled,
.order-history-table .order-status.failed {
    color: #ff0003;
    background-color: #ff000310;
}

/* Extra common WooCommerce statuses (optional but useful) */
.order-history-table .order-status.pending {
    color: #f59e0b;
    background-color: #fef3c7;
}

.order-history-table .order-status.refunded {
    color: #6b7280;
    background-color: #f3f4f6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .order-history-table thead {
        display: none;
    }

    .order-history-table tr {
        display: block;
        margin-bottom: 16px;
        border-radius: 8px;
    }

    .order-history-table td {
        display: block;
        text-align: right;
        padding: 12px 20px;
        border-bottom: 1px solid #e5e7eb;
        position: relative;
    }

    .order-history-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 20px;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 13px;
        color: #6b7280;
    }

    .order-history-table td:last-child {
        border-bottom: none;
    }

    /* Center status on mobile */
    .order-history-table .order-status {
        margin-left: auto;
    }
}

/* =============================================
   Mobile Responsiveness
============================================= */
@media (max-width: 640px) {
    .enrolled-courses-stats {
        grid-template-columns: 1fr;
    }

    .dropdown-menu {
        right: auto;
        left: 0;
        min-width: 100%;
    }

    .my-account-info {
        padding: 1.5rem;
    }
}

/* ============================================================
   REGISTRATION WRAPPER
============================================================ */

.totl-registration-wrapper {
    width: 100% !important;
    max-width: 900px !important;
    margin: 40px auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}


/* ============================================================
   CARD
============================================================ */

.totl-registration-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;

    background: #ffffff !important;
    border: 1px solid #e8ebee !important;
    border-radius: 20px !important;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.07) !important;

    padding: 48px !important;
}


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

.totl-registration-header {
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 auto 42px !important;
    text-align: center !important;
}

.totl-registration-badge {
    display: inline-flex !important;
    align-items: center !important;

    padding: 7px 14px !important;
    border-radius: 30px !important;

    background: #f2f8df !important;
    color: #6f9700 !important;

    font-size: 13px !important;
    font-weight: 700 !important;

    letter-spacing: 0.02em !important;
    margin-bottom: 14px !important;
}

.totl-registration-header h2 {
    margin: 0 0 12px !important;

    color: #20252b !important;

    font-size: 34px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

.totl-registration-header p {
    margin: 0 !important;

    color: #6b7280 !important;

    font-size: 16px !important;
    line-height: 1.7 !important;
}


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

#totl-registration-form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}


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

.totl-form-section {
    width: 100% !important;
    box-sizing: border-box !important;

    padding: 30px 0 !important;

    border-top: 1px solid #edf0f2 !important;
}

.totl-section-heading {
    width: 100% !important;

    display: flex !important;
    align-items: flex-start !important;

    gap: 14px !important;
    margin-bottom: 25px !important;
}

.totl-section-number {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;

    flex-shrink: 0 !important;

    border-radius: 10px !important;

    background: #f2f8df !important;
    color: #719b00 !important;

    font-size: 12px !important;
    font-weight: 800 !important;
}

.totl-section-heading h3 {
    margin: 0 0 3px !important;

    font-size: 18px !important;
    line-height: 1.3 !important;

    color: #20252b !important;
    font-weight: 700 !important;
}

.totl-section-heading p {
    margin: 0 !important;

    color: #8a929b !important;
    font-size: 14px !important;
}


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

.totl-form-grid {
    width: 100% !important;
    max-width: 100% !important;

    display: grid !important;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr) !important;

    gap: 22px !important;

    box-sizing: border-box !important;
}


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

.totl-form-group {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    box-sizing: border-box !important;

    margin: 0 !important;
    padding: 0 !important;
}

.totl-form-group-full {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}


/* ============================================================
   LABELS
============================================================ */

.totl-registration-card
.totl-form-group
label {

    display: block !important;

    width: 100% !important;

    margin: 0 0 8px !important;

    padding: 0 !important;

    color: #30363d !important;

    font-size: 14px !important;
    line-height: 1.4 !important;

    font-weight: 600 !important;

    text-align: left !important;
}

.totl-form-group label .required {
    color: #e25555 !important;
    margin-left: 2px !important;
}


/* ============================================================
   INPUT WRAPPER
============================================================ */

.totl-input-wrapper {
    position: relative !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}


/* ============================================================
   INPUT ICON
============================================================ */

.totl-input-icon {
    position: absolute !important;

    left: 15px !important;

    color: #9aa2aa !important;

    font-size: 15px !important;
    font-weight: 600 !important;

    pointer-events: none !important;

    z-index: 2 !important;
}


/* ============================================================
   INPUTS
============================================================ */

.totl-registration-card
.totl-form-group
input[type="text"],
.totl-registration-card
.totl-form-group
input[type="email"],
.totl-registration-card
.totl-form-group
input[type="password"] {

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    height: 52px !important;

    box-sizing: border-box !important;

    margin: 0 !important;

    padding: 0 15px 0 43px !important;

    border: 1px solid #dfe3e7 !important;

    border-radius: 11px !important;

    background: #fafbfc !important;

    color: #20252b !important;

    font-family: inherit !important;

    font-size: 15px !important;

    line-height: 1.4 !important;

    outline: none !important;

    box-shadow: none !important;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease !important;
}


.totl-registration-card
.totl-form-group
input::placeholder {

    color: #a6adb5 !important;
}


.totl-registration-card
.totl-form-group
input:hover {

    border-color: #c8ced4 !important;

    background: #ffffff !important;
}


.totl-registration-card
.totl-form-group
input:focus {

    border-color: #8cc500 !important;

    background: #ffffff !important;

    box-shadow:
        0 0 0 3px rgba(140, 197, 0, 0.12) !important;
}


/* ============================================================
   PASSWORD TOGGLE
============================================================ */

.totl-password-toggle {

    position: absolute !important;

    right: 10px !important;
    top: 50% !important;

    transform: translateY(-50%) !important;

    width: auto !important;

    border: 0 !important;

    background: transparent !important;

    color: #708000 !important;

    font-size: 12px !important;

    font-weight: 700 !important;

    padding: 7px !important;

    cursor: pointer !important;

    z-index: 3 !important;
}

.totl-password-toggle:hover {
    color: #4f6100 !important;
}


/* ============================================================
   FIELD HELP
============================================================ */

.totl-field-help {
    display: block !important;

    width: 100% !important;

    margin-top: 7px !important;

    color: #8a929b !important;

    font-size: 12px !important;
    line-height: 1.5 !important;
}


/* ============================================================
   ERRORS
============================================================ */

.totl-registration-errors {

    display: flex !important;
    align-items: flex-start !important;

    gap: 12px !important;

    padding: 15px 17px !important;
    margin-bottom: 25px !important;

    border: 1px solid #f2cccc !important;
    border-radius: 11px !important;

    background: #fff7f7 !important;

    color: #8e3535 !important;
}

.totl-error-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;

    border-radius: 50% !important;

    background: #e25555 !important;
    color: #ffffff !important;

    font-size: 13px !important;
    font-weight: 800 !important;
}


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

.totl-registration-submit {
    padding-top: 30px;
    text-align: left;
	margin: auto;
    display: table;
}

.totl-registration-button {
    min-width: 190px !important;
    height: 50px !important;
    border: none !important;
    border-radius: 10px !important;
    background: linear-gradient(
        110deg,
        #8cc500,
        #b4e100
    ) !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow:
        0 8px 20px rgba(140, 197, 0, 0.20) !important;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease !important;
}


/* Hover */

.totl-registration-button:hover {
    color: #ffffff !important;

    transform: translateY(-2px);

    box-shadow:
        0 12px 25px rgba(140, 197, 0, 0.28) !important;
}


/* Click */

.totl-registration-button:active {
    transform: translateY(0);
}


/* Button text */

.totl-registration-button span:first-child {
    display: inline-block;
}


/* Arrow */

.totl-button-arrow {
    display: inline-block;

    font-size: 20px !important;
    font-weight: 400 !important;

    line-height: 1 !important;

    transition:
        transform 0.2s ease !important;
}


.totl-registration-button:hover
.totl-button-arrow {
    transform: translateX(4px);
}


/* ============================================================
   LOGIN PROMPT
============================================================ */

.totl-login-prompt {

    margin-top: 22px !important;

    text-align: center !important;

    color: #7b838c !important;

    font-size: 14px !important;
}

.totl-login-prompt a {

    color: #6d9300 !important;

    font-weight: 700 !important;

    text-decoration: none !important;
}

.totl-login-prompt a:hover {
    text-decoration: underline !important;
}


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

@media (max-width: 700px) {

    .totl-registration-wrapper {
        margin: 20px auto !important;
        padding: 0 12px !important;
    }

    .totl-registration-card {
        padding: 28px 20px !important;
        border-radius: 16px !important;
    }

    .totl-registration-header {
        margin-bottom: 25px !important;
    }

    .totl-registration-header h2 {
        font-size: 28px !important;
    }

    .totl-registration-header p {
        font-size: 14px !important;
    }

    .totl-form-grid {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .totl-form-group-full {
        grid-column: auto !important;
    }

    .totl-form-section {
        padding: 25px 0 !important;
    }
}


@media (max-width: 420px) {

    .totl-registration-card {
        padding: 24px 16px !important;
    }

    .totl-registration-header h2 {
        font-size: 25px !important;
    }

    .totl-section-heading h3 {
        font-size: 16px !important;
    }

    .totl-section-heading p {
        font-size: 13px !important;
    }
}