/* Print Ave - Modern Order Form Styles */

/* CSS Variables for theming */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --secondary: #5f6368;
    --success: #34a853;
    --warning: #fbbc04;
    --danger: #ea4335;
    --dark: #202124;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray-100: #f1f3f4;
    --gray-200: #e8eaed;
    --gray-300: #dadce0;
    --gray-400: #bdc1c6;
    --gray-500: #9aa0a6;
    --gray-600: #80868b;
    --gray-700: #5f6368;
    --gray-800: #3c4043;
    --gray-900: #202124;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--white);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

/* Container */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.logo-img {
    max-width: 250px;
    height: auto;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.tagline {
    color: var(--gray-600);
    font-size: 1rem;
}

/* Card */
.card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    background: var(--gray-100);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.card-body {
    padding: 2rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* File Upload Area */
.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-100);
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area.dragover {
    transform: scale(1.02);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.upload-area:hover .upload-icon {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(26, 115, 232, 0.3);
}

.upload-icon svg {
    width: 32px;
    height: 32px;
    color: var(--white);
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.upload-subtext {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.upload-formats {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* File List */
.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.file-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.file-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.file-remove:hover {
    background: var(--danger);
    color: var(--white);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Group */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: var(--danger);
}

/* Input Styles */
.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    color: var(--gray-800);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

/* Select */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235f6368' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Number Input with Buttons */
.number-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.number-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.number-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.number-input {
    flex: 1;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.875rem;
    min-width: 60px;
}

.number-input:focus {
    outline: none;
}

/* Radio Button Cards */
.radio-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.radio-card {
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-card-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.radio-card-label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.radio-card input:checked+.radio-card-label {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.radio-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: var(--transition);
}

.radio-card input:checked+.radio-card-label .radio-card-icon {
    color: var(--primary);
}

.radio-card-title {
    font-weight: 600;
    color: var(--gray-800);
}

.radio-card-desc {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Color Mode Pills */
.color-pills {
    display: flex;
    gap: 0.75rem;
}

.color-pill {
    position: relative;
    flex: 1;
}

.color-pill input {
    position: absolute;
    opacity: 0;
}

.color-pill-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.color-pill-label:hover {
    border-color: var(--gray-400);
}

.color-pill input:checked+.color-pill-label {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid currentColor;
}

.color-dot.bw {
    background: linear-gradient(135deg, #333 50%, #fff 50%);
}

.color-dot.color {
    background: linear-gradient(135deg, #ea4335 0%, #fbbc04 33%, #34a853 66%, #1a73e8 100%);
    border: none;
}

/* Address Field (conditional) */
.address-field {
    display: none;
    animation: slideDown 0.3s ease;
}

.address-field.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Price Summary */
.price-summary {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    color: var(--white);
    margin-top: 1.5rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.price-row:last-child {
    margin-bottom: 0;
}

.price-label {
    color: var(--gray-400);
}

.price-value {
    font-weight: 500;
}

.price-total {
    border-top: 1px solid var(--gray-700);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    font-size: 1.125rem;
}

.price-total .price-label {
    color: var(--white);
    font-weight: 600;
}

.price-total .price-value {
    font-size: 1.25rem;
    color: var(--success);
}

/* Submit Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.0625rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.footer a {
    color: var(--gray-900);
    text-decoration: none;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

/* Confirmation Page */
.confirmation-card {
    text-align: center;
    padding: 3rem 2rem;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--success) 0%, #2e8b47 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.confirmation-icon svg {
    width: 40px;
    height: 40px;
    color: var(--white);
}

.confirmation-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.confirmation-code {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0;
    letter-spacing: 1px;
}

.confirmation-text {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.order-details {
    background: var(--gray-100);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: left;
    margin: 1.5rem 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--gray-600);
}

.detail-value {
    font-weight: 500;
    color: var(--gray-800);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .radio-cards {
        grid-template-columns: 1fr;
    }

    .price-summary {
        padding: 1rem;
    }
}

/* File Analysis Styles */
.spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26, 115, 232, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.analyzing-text {
    color: var(--primary);
    font-style: italic;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.text-danger {
    color: var(--danger);
}

/* Enhanced File Card Styles */
.file-item {
    display: block;
    padding: 0;
    background: var(--white);
    border: 1px solid var(--gray-300);
    position: relative;
    transition: var(--transition);
}

.file-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}

.file-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.file-options-grid {
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.file-analysis-box {
    margin: 0 1rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.analysis-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: block;
}

.analysis-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.analysis-row.total {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--gray-300);
    color: var(--gray-900);
    font-weight: 700;
}

.analysis-row.total .price-val {
    color: var(--primary);
    font-size: 1.1rem;
}

.coverage-breakdown-btn {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: var(--primary);
    background: none;
    border: none;
    padding: 0.5rem 0 0;
    cursor: pointer;
    text-decoration: underline;
}

.coverage-details {
    display: none;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.8rem;
}

.coverage-details.show {
    display: block;
}

.coverage-item {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
    border-bottom: 1px dotted var(--gray-200);
}

.coverage-item:last-child {
    border-bottom: none;
}

@media (max-width: 600px) {
    .file-options-grid {
        grid-template-columns: 1fr;
    }
}