/* 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;
    }
}