/* Tutoring Component Classes - Phase 2 */
/* Semantic, reusable component classes */

/* ===== BUTTON COMPONENTS ===== */

/* Base Button */
.btn {
    font-family: var(--font-body);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-style: normal;
    letter-spacing: 0%;
    text-align: center;
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 14px;
    line-height: 100%;
}

.btn-md {
    padding: 0.75rem 1.5rem;
    font-size: 16px;
    line-height: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 18px;
    line-height: 100%;
}

.btn-xl {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    line-height: 100%;
}

/* Button Variants */
.btn-primary {
    background-color: var(--navy);
    color: white;
    border: 2px solid var(--navy);
}

.btn-primary:hover {
    background-color: var(--royal-blue);
    border-color: var(--royal-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 37, 59, 0.25);
}

.btn-secondary {
    background-color: var(--aqua-light);
    color: var(--aqua);
    border: 2px solid var(--aqua-light);
}

.btn-secondary:hover {
    background-color: var(--aqua);
    color: white;
    border-color: var(--aqua);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 125, 136, 0.25);
}

.btn-accent {
    background-color: var(--yellow);
    color: var(--slate-grey);
    border: none;
    border-radius: 24px;
    height: 46px;
    font-weight: 600;
    font-size: 18px;
}

.btn-accent:hover {
    background-color: #E6B800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 203, 5, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--royal-blue);
    border: 2px solid var(--royal-blue);
}

.btn-outline:hover {
    background-color: var(--royal-blue);
    color: white;
    border-color: var(--royal-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 60, 144, 0.25);
}

.btn-white {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-white:hover {
    background-color: white;
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
}

/* Button Shapes */
.btn-pill {
    border-radius: 20px;
}

.btn-rounded {
    border-radius: 24px;
}

.btn-square {
    border-radius: 8px;
}

/* Button States */
.btn:disabled {
    background-color: var(--lightgray);
    color: #9CA3AF;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.btn:disabled:hover {
    background-color: var(--lightgray);
    color: #9CA3AF;
    transform: none;
    box-shadow: none;
}

/* Disabled button variants - remove borders */
.btn-primary:disabled {
    background-color: var(--lightgray);
    color: #9CA3AF;
    border: none;
}

.btn-primary:disabled:hover {
    background-color: var(--lightgray);
    color: #9CA3AF;
    border: none;
}

.btn-secondary:disabled {
    background-color: var(--lightgray);
    color: #9CA3AF;
    border: none;
}

.btn-secondary:disabled:hover {
    background-color: var(--lightgray);
    color: #9CA3AF;
    border: none;
}

/* Button with Icons */
.btn-icon {
    gap: 0.5rem;
}

.btn-icon-sm {
    gap: 0.25rem;
}

.btn-icon-lg {
    gap: 0.75rem;
}

/* ===== CARD COMPONENTS ===== */

/* Base Card */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Card Sizes */
.card-sm {
    border-radius: 8px;
    padding: 1rem;
}

.card-md {
    border-radius: 12px;
    padding: 1.5rem;
}

.card-lg {
    border-radius: 20px;
    padding: 2rem;
}

.card-xl {
    border-radius: 20px;
    padding: 2rem 3rem;
}

/* Card Variants */
.card-elevated {
    box-shadow: 0px 8px 14px 0px rgba(0, 0, 0, 0.05);
}

.card-flat {
    box-shadow: none;
    border: 1px solid var(--lightgray);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Card Content Areas */
.card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--lightgray);
}

.card-body {
    flex-grow: 1;
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--lightgray);
}

/* ===== FORM COMPONENTS ===== */

/* Form Input */
.form-input {
    border: 2px solid var(--lightgray);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: white;
    width: 100%;
}

.form-input:focus {
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 60, 144, 0.1);
}

.form-input:disabled {
    background-color: var(--background-light);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-input::placeholder {
    color: var(--text-secondary);
}

/* Form Select */
.form-select {
    border: 2px solid var(--lightgray);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: white;
    width: 100%;
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 60, 144, 0.1);
}

/* Form Textarea */
.form-textarea {
    border: 2px solid var(--lightgray);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: white;
    width: 100%;
    min-height: 120px;
    resize: vertical;
}

.form-textarea:focus {
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 60, 144, 0.1);
}

/* Form Labels */
.form-label {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-label-required::after {
    content: " *";
    color: #DC2626;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Form Validation States */
.form-input.error {
    border-color: #DC2626;
}

.form-input.success {
    border-color: #059669;
}

.form-error {
    color: #DC2626;
    font-size: 14px;
    margin-top: 0.25rem;
}

.form-success {
    color: #059669;
    font-size: 14px;
    margin-top: 0.25rem;
}

/* ===== OPTION BUTTONS ===== */

.option-btn {
    background: white;
    border: 2px solid var(--lightgray);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.option-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 60, 144, 0.15);
}

.option-btn.selected {
    background-color: white;
    border-color: var(--yellow);
    color: var(--text-primary);
    font-weight: 700;
}

.option-btn.selected:hover {
    background-color: white;
    border-color: var(--yellow);
    color: var(--text-primary);
    font-weight: 700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 203, 5, 0.3);
}

/* ===== DROPDOWN COMPONENTS ===== */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: none;
    background-color: transparent;
    cursor: pointer;
    transition: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 100%;
    color: var(--text-primary);
    padding: 0;
}

.dropdown-toggle:hover {
    border-color: transparent;
}

.dropdown-toggle.active {
    border-color: transparent;
    box-shadow: none;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 2px solid var(--lightgray);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    margin-top: 0.25rem;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 100%;
    color: var(--text-primary);
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--background-light);
}

.dropdown-item.selected {
    background-color: var(--aqua);
    color: white;
}

/* ===== BADGE COMPONENTS ===== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-body);
}

.badge-sm {
    padding: 0.125rem 0.5rem;
    font-size: 10px;
}

.badge-lg {
    padding: 0.5rem 1rem;
    font-size: 14px;
}

.badge-primary {
    background-color: var(--background-light);
    color: var(--text-primary);
}

.badge-secondary {
    background-color: var(--lightgray);
    color: var(--text-primary);
}

.badge-accent {
    background-color: var(--aqua);
    color: white;
}

.badge-success {
    background-color: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background-color: #FEF3C7;
    color: #92400E;
}

/* ===== ICON + TEXT COMPONENTS ===== */

.icon-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-text-sm {
    gap: 0.25rem;
}

.icon-text-lg {
    gap: 0.75rem;
}

.icon-text-xl {
    gap: 1rem;
}

/* ===== RATING COMPONENTS ===== */

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.star {
    width: 16px;
    height: 16px;
}

.star.filled {
    opacity: 1;
}

.star.half {
    opacity: 0.5;
}

.star.empty {
    opacity: 0.3;
}

.rating-text {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    margin-left: 0.5rem;
}

/* ===== RESPONSIVE COMPONENTS ===== */

@media (max-width: 768px) {
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-sm {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .card-lg {
        padding: 1.5rem;
    }
    
    .card-xl {
        padding: 1.5rem;
    }
    
    .option-btn {
        min-width: 100px;
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}
