/* Base Styles */
.lms-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 20px;
    ;
}

.lms-container h2,
.lms-container h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

/* Form Styles */
.lms-apply-section {
    margin-bottom: 30px;
    padding: 0;
    background: #f9f9f9;
    border-radius: 5px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group label[required]::after {
    content: " *";
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 80px;
}

.time-selector {
    margin-top: 5px;
    width: 100%;
    padding: 8px;
}

.lms-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    min-width: 80px;
}

.lms-button:hover {
    background: #2980b9;
}

.lms-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Days count display */
#lms-day-count {
    font-weight: bold;
    font-size: 18px;
    color: #3498db;
    margin: 5px 0 15px;
}

/* Table Styles */
.lms-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.lms-table th,
.lms-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.lms-table th {
    background: #f2f2f2;
}

/* Status Indicators */
.status-pending {
    color: #f39c12;
    font-weight: bold;
}

.status-approved {
    color: #2ecc71;
    font-weight: bold;
}

.status-rejected {
    color: #e74c3c;
    font-weight: bold;
}

.status-cancelled {
    color: #7f8c8d;
    font-weight: bold;
}

/* Messages */
.lms-message,
.lms-response,
.lms-error,
.lms-loading {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.lms-response.lms-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.lms-response.lms-error,
.lms-error {
    /* background: #f8d7da;
    color: #721c24; */
    /* border: 1px solid #f5c6cb; */
}

.lms-loading {
    background: #f2f2f2;
    text-align: center;
    font-style: italic;
    color: #7f8c8d;
}

/* Datepicker fix */
.ui-datepicker {
    z-index: 9999 !important;
}

/* Sections */
.lms-balance-section,
.lms-history-section {
    margin-top: 30px;
    /* padding: 20px; */
    background: #f9f9f9;
    border-radius: 5px;
}

/* Cancel button styles */
.cancel-leave-btn {
    background: #e74c3c;
    padding: 5px 10px;
    font-size: 14px;
}

.cancel-leave-btn:hover {
    background: #c0392b;
}

.lms-button.small {
    padding: 5px 10px;
    font-size: 14px;
}

/* History table adjustments */
#lms-history-table td:last-child {
    text-align: center;
    min-width: 100px;
}

/* Pending Leave Card Styles */
.lms-pending-leave-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.lms-pending-leave-card .card-left {
    flex: 1;
}

.lms-pending-leave-card .card-right {
    text-align: right;
    flex: 1;
}

.lms-pending-leave-card .card-right .card-actions {
    margin-top: 10px;
}

.lms-pending-leave-card .card-right .card-actions button {
    margin-left: 5px;
    max-width: 120px;
    margin-bottom: 5px;
}

.lms-pending-leave-card p {
    margin: 5px 0;
}

.lms-leave-types-container {
    margin-top: 20px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
}

.lms-leave-types-container h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

#lms-add-leave-type-form {
    margin-bottom: 20px;
}

#lms-leave-types-table th {
    background: #f2f2f2;
    font-weight: bold;
}

#lms-leave-types-table td {
    text-align: left;
}

.lms-leave-types-container .lms-button {
    margin-top: 10px;
}

@media (max-width: 768px) {
    .lms-container {
        /* padding: 10px; */
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .lms-apply-section,
    .lms-balance-section,
    .lms-history-section {
        /* padding: 15px; */
    }

    .lms-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Date picker fields */
    .form-row .form-group {
        display: flex;
        flex-direction: column;
    }

    .time-selector {
        width: auto;
        margin-top: 5px;
    }

    /* Button sizing */
    .lms-button {
        width: 100%;
        padding: 12px;
    }

    .cancel-leave-btn {
        width: auto;
        padding: 8px 12px;
    }

    /* Table adjustments */
    #lms-history-table th,
    #lms-history-table td {
        padding: 8px 5px;
        font-size: 14px;
    }

    /* Hide less important columns on small screens */
    @media (max-width: 480px) {

        #lms-history-table th:nth-child(5),
        #lms-history-table td:nth-child(5) {
            display: none;
        }
    }
}

/* General mobile-friendly additions */
input,
select,
textarea {
    max-width: 100%;
    box-sizing: border-box;
}

.datepicker {
    width: 100% !important;
}

.ui-datepicker {
    width: 95% !important;
    max-width: 300px;
}

.lms-scrollable-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.lms-scrollable-table table {
    width: 100%;
    border-collapse: collapse;
}

.lms-scrollable-table table td:first-child {
    min-width: 150px;
    /* Adjust width for leave type column */
}

.lms-input {
    width: 100px;
    /* Adjust width as needed */
    padding: 5px;
    box-sizing: border-box;
}

.entry-header {
    display: none;
}

.ast-plain-container #primary {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}


.ast-mobile-header-wrap .ast-primary-header-bar,
.ast-primary-header-bar .site-primary-header-wrap {
    min-height: 40px;
}

.ast-plain-container.ast-no-sidebar {
    margin-top: 0;
}

.wpum-action-links {
    padding: 0 !important;
}

.field-hide {
    display: none;
}


.ast-container {
    padding-left: 10px;
    padding-right: 10px;
}

.ast-header-break-point #masthead .ast-mobile-header-wrap .ast-primary-header-bar,
.ast-header-break-point #masthead .ast-mobile-header-wrap .ast-below-header-bar,
.ast-header-break-point #masthead .ast-mobile-header-wrap .ast-above-header-bar {
    padding-left: 20px;
    padding-right: 10px;
}


.wpum-login-center-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 120px;
}
.wpum-login-inner {
    width: 100%;
    max-width: 400px;
    background: #fff;
    padding: 32px 24px 24px 24px;
    /* border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08); */
    text-align: center;
}
.wpum-login-logo {
    margin-bottom: 24px;
}
.wpum-login-logo img {
    max-width: 120px;
    height: auto;
    display: inline-block;
}

.wpum-action-links {
    display: grid;
    justify-content: center;
    flex: 1;
    text-align: center;
}

.site-header {
    display: none;
}

.logged-in .site-header {
    display: block;
}

.site-footer {
    display: none;
}

/* Hide for non-logged-in users */
.hide-for-guests {
    display: none;
}

/* Hide for subscribers */
.hide-for-subscriber {
    display: none;
}

body.logged-in .hide-for-guests {
    display: block;
}

body.logged-in.role-subscriber .hide-for-subscriber {
    display: none !important;
}