/**
 * Upstate Request Quote - Form Styles
 * Matching the Upstate Construction brand colors
 */

:root {
    --upstate-gold: #F5B700;
    --upstate-navy: #000033;
    --upstate-dark-navy: #00001a;
    --upstate-light-gray: #f5f5f5;
    --upstate-border-gray: #e0e0e0;
    --upstate-text-gray: #666666;
    --upstate-white: #ffffff;
    --upstate-error: #dc3545;
    --upstate-success: #28a745;
}

.upstate-quote-container {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.upstate-quote-form-wrapper {
    background: var(--upstate-white);
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 51, 0.08);
    padding: 50px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .upstate-quote-form-wrapper {
        padding: 30px 20px;
    }
}

.upstate-form-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--upstate-navy);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.upstate-form-description {
    font-size: 16px;
    color: var(--upstate-text-gray);
    margin: 0 0 35px 0;
    line-height: 1.6;
}

.upstate-quote-form {
    width: 100%;
}

.upstate-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .upstate-form-row {
        grid-template-columns: 1fr;
    }
}

.upstate-form-group {
    margin-bottom: 25px;
    width: 100%;
}

.upstate-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--upstate-navy);
    margin-bottom: 8px;
}

.upstate-form-group label .required {
    color: var(--upstate-error);
    font-weight: 700;
}

.upstate-form-group input[type="text"],
.upstate-form-group input[type="email"],
.upstate-form-group input[type="tel"],
.upstate-form-group select,
.upstate-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--upstate-navy);
    background: var(--upstate-white);
    border: 2px solid var(--upstate-border-gray);
    border-radius: 4px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.upstate-form-group input[type="text"]:focus,
.upstate-form-group input[type="email"]:focus,
.upstate-form-group input[type="tel"]:focus,
.upstate-form-group select:focus,
.upstate-form-group textarea:focus {
    outline: none;
    border-color: var(--upstate-gold);
    box-shadow: 0 0 0 3px rgba(245, 183, 0, 0.1);
}

.upstate-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23000033' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

.upstate-form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.upstate-form-group textarea::placeholder {
    color: #999;
}

.upstate-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: var(--upstate-navy);
    background: var(--upstate-gold);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-family: inherit;
}

.upstate-submit-btn:hover {
    background: #d9a300;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 183, 0, 0.3);
}

.upstate-submit-btn:active {
    transform: translateY(0);
}

.upstate-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.upstate-submit-btn svg {
    transition: transform 0.3s ease;
}

.upstate-submit-btn:hover svg {
    transform: translateX(4px);
}

/* Loading state */
.upstate-submit-btn.loading {
    position: relative;
    color: transparent;
}

.upstate-submit-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid var(--upstate-navy);
    border-radius: 50%;
    border-top-color: transparent;
    animation: upstate-spinner 0.8s linear infinite;
}

@keyframes upstate-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Form messages */
.upstate-form-message {
    margin: 20px 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.5;
    border-radius: 4px;
    display: none;
}

.upstate-form-message.show {
    display: block;
    padding: 16px 20px;
}

.upstate-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.upstate-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Input validation states */
.upstate-form-group input.error,
.upstate-form-group select.error,
.upstate-form-group textarea.error {
    border-color: var(--upstate-error);
}

.upstate-form-group input.error:focus,
.upstate-form-group select.error:focus,
.upstate-form-group textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .upstate-submit-btn,
    .upstate-form-group input,
    .upstate-form-group select,
    .upstate-form-group textarea {
        transition: none;
    }
    
    .upstate-submit-btn:hover {
        transform: none;
    }
}

/* Date input styling */
.upstate-form-group input[type="date"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--upstate-navy);
    background: var(--upstate-white);
    border: 2px solid var(--upstate-border-gray);
    border-radius: 4px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.upstate-form-group input[type="date"]:focus {
    outline: none;
    border-color: var(--upstate-gold);
    box-shadow: 0 0 0 3px rgba(245, 183, 0, 0.1);
}

/* Consultation form specific styles */
.upstate-consultation-container .upstate-form-title {
    color: var(--upstate-navy);
}

/* Print styles */
@media print {
    .upstate-submit-btn {
        display: none;
    }
}
