/* ============================================
   COMPONENTS.CSS - Reusable Component Styles
   ============================================ */

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-secondary:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== CARDS ===== */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

/* ===== INPUTS & FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-normal);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

textarea {
    resize: vertical;
}

select {
    cursor: pointer;
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 36px;
}

/* ===== CHECKBOXES & RADIO ===== */
input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

input[type="checkbox"]:checked {
    accent-color: var(--accent-primary);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-group label span {
    margin-left: 8px;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table thead {
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
}

table th,
table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    font-weight: 700;
    color: var(--text-primary);
}

table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.total-row {
    background-color: var(--bg-secondary);
    font-weight: 700;
    border-top: 2px solid var(--border-color);
}

/* ===== ACCORDION ===== */
.accordion {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    padding: 16px 20px;
    background-color: var(--bg-secondary);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-normal);
    color: var(--text-primary);
}

.accordion-header:hover {
    background-color: var(--bg-tertiary);
}

.accordion-icon {
    transition: transform var(--transition-normal);
    font-weight: 700;
}

.accordion-item.active .accordion-header {
    background-color: var(--accent-primary);
    color: white;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    padding: 0 20px;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    padding: 16px 20px;
}

.accordion-content p,
.accordion-content ul {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== FAQ SPECIFIC ===== */
.faq-search-input {
    margin-bottom: 24px;
    width: 100%;
}

.faq-item {
    margin-bottom: 12px;
}

.faq-header {
    width: 100%;
    padding: 16px 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-normal);
    color: var(--text-primary);
}

.faq-header:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.faq-icon {
    transition: transform var(--transition-normal);
}

.faq-item.active .faq-header {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 6px 6px;
}

.faq-item.active .faq-content {
    max-height: 500px;
    padding: 16px 20px;
}

.faq-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-primary);
    transition: width var(--transition-normal);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    opacity: 0.5;
    transition: opacity var(--transition-normal);
}

.progress-step.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.progress-step.active .step-number {
    background-color: var(--accent-primary);
    color: white;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-secondary);
}

.progress-step.active .step-label {
    color: var(--text-primary);
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-primary);
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.modal-content h2 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
}

.modal-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.modal-content .btn {
    margin-top: 20px;
}
