/* 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;
}

/* Add-on Products Styles */
#ssc-addons-section {
    margin-top: 2rem;
}

#ssc-addons-section .ssc-section-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 1.5rem;
}

.ssc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: ssc-spin 0.8s linear infinite;
}

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

.ssc-addon-category {
    margin-bottom: 2rem;
}

.ssc-addon-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.ssc-addon-products {
    display: grid;
    gap: 1rem;
}

.ssc-addon-product {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.ssc-addon-product:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.ssc-addon-product-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.ssc-addon-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.ssc-addon-label input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 20px;
    height: 20px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}

.ssc-addon-label > div {
    flex: 1;
}

.ssc-addon-name {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 15px;
}

.ssc-addon-description {
    display: block;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.ssc-addon-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.ssc-addon-price {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
    white-space: nowrap;
}

.ssc-addon-quantity-wrapper {
    display: flex;
    align-items: center;
}

.ssc-addon-quantity-wrapper label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
    color: #666;
    margin: 0;
}

.ssc-addon-quantity {
    width: 60px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.ssc-addon-quantity:focus {
    border-color: #667eea;
    outline: none;
}

/* Responsive addon styles */
@media (max-width: 768px) {
    .ssc-addon-product-info {
        flex-direction: column;
    }

    .ssc-addon-pricing {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }

    .ssc-addon-quantity-wrapper {
        order: 2;
    }
}

/* Multi-Tier Cake Styles */
.ssc-tier-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    position: relative;
}

.ssc-tier-section:nth-child(even) {
    border-left-color: #764ba2;
}

.ssc-tier-heading {
    color: #495057;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.ssc-tier-heading:before {
    content: '🎂 ';
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

/* Tier field spacing */
#multi-tier-fields .ssc-form-row {
    margin-bottom: 1rem;
}

#multi-tier-fields .ssc-form-field {
    margin-bottom: 0;
}

/* Hide/show tier containers */
#single-tier-fields {
    transition: opacity 0.3s ease;
}

#multi-tier-fields {
    transition: opacity 0.3s ease;
}

/* Tier count selector emphasis */
#tier_count {
    font-weight: 600;
    border: 2px solid #667eea;
    font-size: 1.05rem;
}

#tier_count:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive tier styles */
@media (max-width: 768px) {
    .ssc-tier-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .ssc-tier-heading {
        font-size: 1.1rem;
    }
}