/* IDP Vendor Finder Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Neutral, professional color scheme for vendor directory */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #eff6ff;
    --secondary-color: #1e293b;
    --text-color: #334155;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --background: #f8fafc;
    --white: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    margin: 0;
    overflow: hidden;
}

/* App Layout */
.app-layout {
    display: grid;
    grid-template-areas:
        "header header"
        "sidebar main";
    grid-template-columns: 280px 1fr;
    grid-template-rows: 70px 1fr;
    height: 100vh;
    width: 100vw;
}

/* Top Header */
.app-header {
    grid-area: header;
    background: linear-gradient(135deg, var(--secondary-color), #0f172a);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Sidebar */
.app-sidebar {
    grid-area: sidebar;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
    transition: width 0.4s ease;
    width: 0%;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
}

.sidebar-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-step:hover {
    background: var(--background);
}

.sidebar-step.active {
    background: var(--primary-light);
    border-left-color: var(--primary-color);
}

.sidebar-step.completed {
    opacity: 0.7;
}

.sidebar-step.completed .step-number {
    background: var(--success);
    color: white;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-step.active .step-number {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.step-info {
    flex: 1;
    min-width: 0;
}

.step-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-status {
    font-size: 11px;
    color: var(--text-light);
}

.sidebar-step.active .step-status {
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-step.completed .step-status {
    color: var(--success);
}

/* Main Content Area */
.app-main {
    grid-area: main;
    overflow-y: auto;
    background: var(--background);
    padding: 32px;
}

/* Form Container */
.form-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    max-width: 1000px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0px;
    color: white;
}

.logo-subtitle {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 400;
    color: white;
}

/* Steps */
.step {
    display: none;
    padding: 40px;
    min-height: 500px;
}

.step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.step-indicator {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.2;
}

.step-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.3;
}

.subtitle {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
}

.help-text {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 32px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--white);
    color: var(--text-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-light);
}

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

/* Checkbox and Radio Cards */
.checkbox-group,
.radio-group {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.checkbox-card,
.radio-card {
    display: block;
    cursor: pointer;
}

.checkbox-card input[type="checkbox"],
.radio-card input[type="radio"] {
    display: none;
}

.card-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--white);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.checkbox-card:hover .card-content,
.radio-card:hover .card-content {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.checkbox-card input:checked ~ .card-content,
.radio-card input:checked ~ .card-content {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.card-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.card-title {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 15px;
    margin-bottom: 2px;
}

.card-description {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Compact Checkbox Group */
.checkbox-group-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 11px;
    border-radius: 7px;
    transition: background 0.2s ease;
    font-size: 14px;
}

.checkbox-label:hover {
    background: var(--background);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Conditional Sections */
.conditional-section {
    margin-top: 24px;
    padding: 24px;
    background: var(--background);
    border-radius: 10px;
    border: 1.5px dashed var(--border-color);
}

/* Buttons */
.btn {
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--secondary-color);
    border: 1.5px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--background);
    border-color: var(--text-color);
}

.step-actions {
    display: flex;
    gap: 14px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1.5px solid var(--border-color);
}

.step-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-color: var(--primary-color);
}

.step-actions .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.step-actions .btn-secondary {
    background: var(--white);
    color: var(--secondary-color);
    border-color: var(--border-color);
}

.step-actions .btn-secondary:hover {
    background: var(--background);
    border-color: var(--text-color);
}

/* Requirements Summary */
.requirements-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1.5px solid var(--primary-color);
    border-radius: 10px;
    padding: 26px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.requirements-summary h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.requirements-summary h3::before {
    content: '📋';
    font-size: 22px;
}

.summary-section {
    margin-bottom: 20px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.summary-section h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-section h4::before {
    content: '▸';
    color: var(--primary-color);
    font-size: 16px;
}

.summary-section ul {
    list-style: none;
    padding-left: 0;
}

.summary-section li {
    padding: 7px 0;
    padding-left: 22px;
    position: relative;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
}

.summary-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 15px;
}

.summary-section li strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Success Screen */
.success-content {
    text-align: center;
    padding: 60px 48px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 40px;
    color: var(--white);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

.success-details {
    background: var(--background);
    border-radius: 10px;
    padding: 32px;
    margin: 32px 0;
    text-align: left;
}

.success-details p {
    margin-bottom: 16px;
    color: var(--text-color);
    line-height: 1.7;
}

.success-details ul {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.success-details li {
    padding: 10px 0;
    padding-left: 32px;
    position: relative;
    color: var(--text-color);
}

.success-details li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 18px;
}

.success-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 32px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .app-layout {
        grid-template-areas:
            "header"
            "main";
        grid-template-columns: 1fr;
        grid-template-rows: 70px 1fr;
    }

    .app-sidebar {
        position: fixed;
        left: -280px;
        top: 70px;
        bottom: 0;
        width: 280px;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
    }

    .app-sidebar.open {
        left: 0;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 0 16px;
    }

    .app-main {
        padding: 16px;
    }

    .step {
        padding: 24px 16px;
    }

    .step-content h2 {
        font-size: 22px;
    }

    .logo-title {
        font-size: 15px;
    }

    .logo-subtitle {
        display: none;
    }

    .step-actions {
        flex-direction: column;
    }

    .success-content {
        padding: 32px 16px;
    }

    .success-actions {
        flex-direction: column;
    }
}

/* Loading State */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form Validation Styles */
.error-message {
    display: none;
    color: var(--danger);
    font-size: 13px;
    margin-top: 6px;
    padding: 8px 12px;
    background: #fef2f2;
    border-left: 3px solid var(--danger);
    border-radius: 4px;
    animation: slideIn 0.3s ease;
}

.error-message.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--danger);
    background: #fef2f2;
}

.form-group.has-error label {
    color: var(--danger);
}

.form-group.has-success input,
.form-group.has-success select,
.form-group.has-success textarea {
    border-color: var(--success);
    background: #f0fdf4;
}

.checkbox-group.has-error,
.radio-group.has-error {
    padding: 16px;
    background: #fef2f2;
    border: 1.5px solid var(--danger);
    border-radius: 10px;
}

.validation-summary {
    display: none;
    background: #fef2f2;
    border-left: 4px solid var(--danger);
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

.validation-summary.show {
    display: block;
}

.validation-summary h4 {
    color: var(--danger);
    font-size: 15px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.validation-summary h4::before {
    content: '⚠';
    font-size: 18px;
}

.validation-summary ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.validation-summary li {
    padding: 4px 0;
    padding-left: 20px;
    color: var(--danger);
    font-size: 14px;
    position: relative;
}

.validation-summary li::before {
    content: '•';
    position: absolute;
    left: 8px;
    font-weight: bold;
}

/* Submission Error Box */
.submission-error {
    display: none;
    background: #fef2f2;
    border: 1.5px solid var(--danger);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 32px;
    animation: slideIn 0.3s ease;
}

.submission-error h4 {
    color: var(--danger);
    font-size: 17px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.submission-error p {
    margin-bottom: 12px;
    color: var(--text-color);
    line-height: 1.6;
}

.submission-error a {
    color: var(--primary-color);
    text-decoration: underline;
}

.submission-error a:hover {
    color: var(--primary-dark);
}

/* Shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.4s ease;
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .app-sidebar,
    .app-header,
    .step-actions {
        display: none;
    }

    .app-main {
        padding: 0;
    }

    .step {
        display: block !important;
        page-break-after: always;
    }
}
