/* Cake Consultation Form Styles */

.ssc-consultation-form {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
}

/* Header */
.ssc-form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f8f9fa;
}

.ssc-form-header h2 {
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ssc-form-description {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

/* Form Messages */
.ssc-form-messages {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.ssc-form-messages.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ssc-form-messages.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ssc-form-messages.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Form Sections */
.ssc-form-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: #fdfdfd;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.ssc-form-section h3 {
    color: #495057;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    position: relative;
}

.ssc-form-section h3:before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Form Layout */
.ssc-form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.ssc-form-row .ssc-form-field.ssc-half {
    flex: 1;
}

.ssc-form-row .ssc-form-field.ssc-quarter {
    flex: 0 0 calc(25% - 1.125rem);
}

.ssc-form-field {
    margin-bottom: 1.5rem;
}

.ssc-form-field label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.ssc-form-field .required {
    color: #dc3545;
    font-weight: bold;
}

/* Form Controls */
.ssc-form-field input[type="text"],
.ssc-form-field input[type="email"],
.ssc-form-field input[type="tel"],
.ssc-form-field input[type="date"],
.ssc-form-field input[type="number"],
.ssc-form-field select,
.ssc-form-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.ssc-form-field input:focus,
.ssc-form-field select:focus,
.ssc-form-field textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

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

/* Select Styling */
.ssc-form-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23495057' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 15px;
    padding-right: 40px;
}

/* AI Generation Section */
.ssc-ai-controls {
    text-align: center;
    margin: 1.5rem 0;
}

.ssc-ai-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ssc-ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

.ssc-ai-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ssc-btn-loading {
    display: inline-block;
}

.ssc-btn-loading:before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* AI Preview */
.ssc-ai-preview {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

.ssc-ai-preview h4 {
    color: #495057;
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

.ssc-ai-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.ssc-ai-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ssc-ai-image img {
    width: 100%;
    height: auto;
    display: block;
}

.ssc-ai-note {
    color: #6c757d;
    font-size: 0.9rem;
    font-style: italic;
    margin: 1rem 0 0 0;
    text-align: center;
}

/* Submit Button */
.ssc-form-actions {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f8f9fa;
}

.ssc-submit-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 200px;
}

.ssc-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

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

.ssc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
.ssc-success-message {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 12px;
    border: 2px solid #28a745;
}

.ssc-success-message h3 {
    color: #155724;
    font-size: 2rem;
    margin: 0 0 1rem 0;
}

.ssc-success-message p {
    color: #155724;
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ssc-consultation-form {
        margin: 1rem;
        padding: 1.5rem;
    }

    .ssc-form-header h2 {
        font-size: 1.8rem;
    }

    .ssc-form-row {
        flex-direction: column;
        gap: 0;
    }

    .ssc-form-row .ssc-form-field.ssc-quarter {
        flex: none;
    }

    .ssc-form-section {
        padding: 1rem;
    }

    .ssc-ai-images {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ssc-consultation-form {
        margin: 0.5rem;
        padding: 1rem;
    }

    .ssc-form-header h2 {
        font-size: 1.5rem;
    }

    .ssc-submit-btn {
        width: 100%;
        padding: 14px 20px;
    }
}

/* Loading States */
.ssc-loading {
    opacity: 0.6;
    pointer-events: none;
}

.ssc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Validation States */
.ssc-form-field.error input,
.ssc-form-field.error select,
.ssc-form-field.error textarea {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.ssc-form-field.error label {
    color: #dc3545;
}

.ssc-error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Checkbox Labels */
.ssc-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    padding: 0.5rem 0;
}

.ssc-checkbox-label input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

.ssc-checkbox-label:hover {
    color: #667eea;
}

/* Accessibility */
.ssc-consultation-form *:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px !important;
    height: 1px !important;
    overflow: hidden;
}