/* Learn Home Page Styles */
.home-container {
    padding: 1em;
    max-width: 1200px;
    margin: 0 auto;
}

/* Heading styles */
.home-heading {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    color: #000000;
    background: linear-gradient(90deg, rgb(255, 255, 255), rgb(207, 203, 203));
    padding: 0.3rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Variant Dropdown */
.variant-dropdown-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.variant-dropdown {
    position: relative;
    width: 100%;
    max-width: 340px;
}

.variant-dropdown-toggle {
    width: 100%;
    background: linear-gradient(180deg, #1a7a3f 0%, #166534 100%);
    color: #ffffff;
    border: 1px solid #14532d;
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(20, 83, 45, 0.18);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.variant-dropdown-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(20, 83, 45, 0.22);
}

.variant-dropdown-arrow {
    transition: transform 0.2s ease;
}

.variant-dropdown.is-open .variant-dropdown-arrow {
    transform: rotate(180deg);
}

.variant-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    background-color: #14532d;
    border-radius: 0.625rem;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
    border: 1px solid #1f7f45;
    overflow: hidden;
    z-index: 200;
}

.variant-dropdown-search-wrap {
    padding: 0.55rem;
    background-color: #14532d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.variant-dropdown-search {
    width: 100%;
    border: none;
    border-radius: 0.5rem;
    padding: 0.55rem 0.7rem;
    font-size: 1rem;
    color: #0b3a1e;
}

.variant-dropdown-search:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 1px;
}

.variant-options {
    list-style: none;
    margin: 0;
    padding: 0.3rem 0;
    max-height: 250px;
    overflow-y: auto;
}

.variant-option {
    width: 100%;
    border: none;
    background: transparent;
    color: #ffffff;
    text-align: left;
    padding: 0.55rem 0.95rem;
    font-size: 1rem;
    cursor: pointer;
}

.variant-option:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.variant-option.is-selected {
    background-color: #2563eb;
}

.variant-option.is-hidden {
    display: none;
}

.variant-no-results {
    margin: 0;
    padding: 0.65rem 0.95rem 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 20px;
}

.input-container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem;
    width: 40vw;
    min-width: 300px;
}

#learner-input {
    width: 100%;
    border: 2px solid #ccc;
    border-radius: 5px;
    padding: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#learner-input:focus {
    border-color: #54889b;
    box-shadow: 0 0 5px rgba(84, 136, 155, 0.5);
    outline: none;
}

.continue-btn-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Add Learner button styling */
#add-learner-btn {
    background-color: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

#add-learner-btn:hover {
    background-color: #059669;
}

#start-learning-btn {
    background-color: #166534;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

#start-learning-btn:hover {
    background-color: #16a34a;
}

/* Attendance Summary - fixed in left margin */
.attendance-summary {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    z-index: 100;
    width: 180px;
}

.card {
    background-color: #ffffff;
    color: #000;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    text-align: center;
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
}

.card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

/* Learners Table Container */
.learners-table-container {
    margin-top: 2rem;
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* DataTables Customization */
#learners-table {
    width: 100%;
    font-size: 1rem;
}

#learners-table th,
#learners-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

#learners-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #d1d5db;
}

#learners-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Checkbox styles */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #10b981;
}

/* Delete icon styles */
.delete-icon {
    cursor: pointer;
    color: #ef4444;
    transition: all 0.3s ease;
    width: 20px;
    height: 20px;
    padding: 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.delete-icon:hover {
    color: #ffffff;
    background-color: #ef4444;
    transform: scale(1.1);
}

.delete-icon:active {
    transform: scale(0.95);
}

/* Responsive styles for smaller screens */
@media (max-width: 768px) {
    .variant-dropdown-container {
        width: 100%;
    }

    .variant-dropdown {
        max-width: none;
    }

    .variant-dropdown-toggle {
        font-size: 1rem;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .input-container {
        width: 100%;
        min-width: auto;
    }

    .continue-btn-container {
        width: 100%;
        justify-content: center;
    }

    .continue-btn-container button {
        width: 100%;
    }

    .attendance-summary {
        position: static;
        transform: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 220px;
        margin: 1rem 0;
    }

    .card {
        width: 100%;
        max-width: none;
    }

    .home-heading {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .home-heading {
        font-size: 1.2em;
    }

    .home-container {
        padding: 0.5em;
    }

    #learners-table th,
    #learners-table td {
        padding: 8px 4px;
        font-size: 0.9rem;
    }
}

/* DataTables Responsive Overrides */
.dataTables_wrapper {
    width: 100%;
}

.dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_filter input {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem;
    margin-left: 0.5rem;
}

.dataTables_length select {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.25rem;
    margin: 0 0.5rem;
}

.dataTables_info {
    color: #6b7280;
    font-size: 0.9rem;
}

.dataTables_paginate .paginate_button {
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dataTables_paginate .paginate_button:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.dataTables_paginate .paginate_button.current {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

.dataTables_paginate .paginate_button.disabled {
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.5;
}

.dataTables_paginate .paginate_button.disabled:hover {
    background-color: white;
    border-color: #d1d5db;
} 
