/* SmartCV UI Components Stylesheet */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.btn-sm {
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    font-size: 1.05rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-lg);
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.btn-primary {
    background: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background: var(--brand-primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.btn-gradient {
    background: var(--brand-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-subtle);
    border-color: var(--text-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.btn-warning {
    background: var(--status-warning);
    color: #ffffff;
}

.btn-danger {
    background: var(--status-danger);
    color: #ffffff;
}

.btn-success {
    background: var(--status-success);
    color: #ffffff;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-label-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: #ffffff;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 85px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Badges & Pills */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-free {
    background: #dcfce7;
    color: #15803d;
}

.badge-pro {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.badge-ats {
    background: #e0f2fe;
    color: #0369a1;
}

/* Modal Dialog System */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop.active {
    display: flex;
}

.modal-dialog {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: min(94vw, 650px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
    margin: auto;
}

.modal-dialog.modal-lg {
    width: min(96vw, 850px);
    max-width: 850px;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.3;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
    max-width: 100%;
}

.toast {
    pointer-events: auto;
    background: #0f172a;
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 280px;
    max-width: 420px;
    animation: toastSlideIn 250ms cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 200ms ease, transform 200ms ease;
    word-break: break-word;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast.toast-success {
    border-left: 4px solid var(--status-success);
}

.toast.toast-error {
    border-left: 4px solid var(--status-danger);
}

.toast.toast-warning {
    border-left: 4px solid var(--status-warning);
}

.toast.toast-info {
    border-left: 4px solid var(--status-info);
}

/* Universal Responsive Table Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

/* Responsive Grid System */
.responsive-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.responsive-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.responsive-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 1.5rem;
}

/* Homepage Component Grids & Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-icon.indigo { background: #e0e7ff; color: #4338ca; }
.feature-icon.emerald { background: #dcfce7; color: #15803d; }
.feature-icon.purple { background: #f3e8ff; color: #7e22ce; }
.feature-icon.amber { background: #fef3c7; color: #b45309; }
.feature-icon.rose { background: #ffe4e6; color: #be123c; }
.feature-icon.blue { background: #e0f2fe; color: #0369a1; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1.5rem;
}

.step-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: #ffffff;
    font-weight: 800;
    font-family: var(--font-display);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* Touch targets and mobile form collapses */
@media (max-width: 768px) {
    .form-grid-2,
    .form-grid-3,
    .responsive-grid-2,
    .responsive-grid-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modal-header {
        padding: 1rem 1.25rem;
    }

    .modal-body {
        padding: 1.25rem;
    }

    .modal-footer {
        padding: 0.85rem 1.25rem;
    }

    .toast-container {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        align-items: stretch;
    }

    .toast {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
}

/* Breadcrumbs (Technical SEO & UX) */
.breadcrumb-container {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    font-size: 0.88rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.breadcrumb-item.active span {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--text-muted);
    user-select: none;
}

/* FAQ Accordion Component */
.faq-section {
    padding: 4.5rem 0;
    background: #ffffff;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 860px;
    margin: 2.5rem auto 0;
}

.faq-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: #ffffff;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.faq-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.faq-icon {
    font-size: 1.2rem;
    color: var(--brand-primary);
    transition: transform var(--transition-fast);
}

.faq-card.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem 1.35rem;
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 0.95rem;
}

/* Screenreader utilities for accessible SEO headings */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

