/* Frontend Styles for Retailer Information Manager */

.retailer-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.retailer-form-container h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    position: relative;
    padding-bottom: 15px;
}

.retailer-form-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 2px;
}

.form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #3498db;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.form-section h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3::before {
    content: '▶';
    color: #3498db;
    font-size: 16px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 15px;
}

.form-group label::after {
    content: ':';
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

.checkbox-group,
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.checkbox-group label,
.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-group label:hover,
.radio-group label:hover {
    background: #e8f4fc;
    transform: translateY(-1px);
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.file-upload-wrapper {
    position: relative;
    margin-top: 10px;
}

.file-upload-wrapper input[type="file"] {
    width: 100%;
    padding: 15px;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-wrapper input[type="file"]:hover {
    border-color: #3498db;
    background: #e8f4fc;
}

.file-upload-wrapper .file-info {
    margin-top: 10px;
    padding: 10px;
    background: #e8f4fc;
    border-radius: 6px;
    font-size: 14px;
    color: #2c3e50;
}

.submit-group {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f1f1f1;
}

.submit-group input[type="submit"] {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.submit-group input[type="submit"]:hover {
    background: linear-gradient(135deg, #2980b9, #1c5a87);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.submit-group input[type="submit"]:active {
    transform: translateY(0);
}

#form-message {
    display: inline-block;
    margin-left: 20px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    animation: fadeIn 0.5s ease;
}

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

/* Required field indicator */
.form-group label[for*="required"]::after {
    content: ' *';
    color: #e74c3c;
}

/* Form validation styles */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #e74c3c;
}

.form-group .error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Progress indicator */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.form-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    transform: translateY(-50%);
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 15px;
}

.progress-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #bdc3c7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 10px;
    transition: all 0.3s ease;
}

.progress-step.active .progress-circle {
    background: #3498db;
    transform: scale(1.1);
}

.progress-label {
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .retailer-form-container {
        padding: 20px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .checkbox-group,
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-progress {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .progress-step {
        flex: 1;
        min-width: 80px;
    }
}

/* Animation for form sections */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: slideIn 0.5s ease forwards;
}

.form-section:nth-child(2) { animation-delay: 0.1s; }
.form-section:nth-child(3) { animation-delay: 0.2s; }
.form-section:nth-child(4) { animation-delay: 0.3s; }


/* Template-specific styles */
.form-section.submit-section {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f1f1f1;
    margin-top: 20px;
}

.section-description {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

.field-description {
    color: #777;
    font-size: 13px;
    margin-top: 5px;
    margin-bottom: 10px;
}

/* Template-specific field styling */
.field-text textarea {
    min-height: 120px;
    resize: vertical;
}

.field-dropdown select,
.field-select select {
    height: 46px;
    line-height: 46px;
}

.field-checkbox .checkbox-option,
.field-radio .radio-option {
    margin-bottom: 8px;
}

.field-checkbox input[type="checkbox"],
.field-radio input[type="radio"] {
    margin-right: 8px;
}

.field-file input[type="file"] {
    padding: 10px;
    border: 2px dashed #bdc3c7;
    border-radius: 6px;
    width: 100%;
    background: #f8f9fa;
}

/* Success state for form */
form.success .form-section {
    border-left-color: #27ae60;
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error states for validation */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #e74c3c;
    background: #fadbd8;
}

.form-group .error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Form styling */
.form-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #ddd;
}

.form-group.has-error {
    border-left-color: #ff6b6b;
    background: #fff5f5;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.form-group .required {
    color: #ff6b6b;
    margin-left: 3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Checkbox and radio styling */
.checkbox-option,
.radio-option {
    margin-bottom: 8px;
    padding: 5px 0;
}

.checkbox-option label,
.radio-option label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"],
.radio-option input[type="radio"] {
    margin-right: 10px;
    width: auto;
}

.checkbox-group-required {
    display: none;
}

.field-required-note {
    color: #ff6b6b;
    font-style: italic;
    margin-top: 5px;
    margin-bottom: 0;
}

/* File upload styling */
.file-upload-wrapper {
    margin-top: 10px;
}

.current-file {
    background: #e8f4fc;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 3px solid #3498db;
}

.remove-file {
    display: inline-block;
    margin-left: 15px;
    font-size: 13px;
    color: #666;
}

.remove-file input {
    margin-right: 5px;
}

.file-size-note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Range slider styling */
input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.range-value {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    background: #0073aa;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 10px;
    font-size: 12px;
    font-weight: bold;
}

/* Error styling */
.retailer-form-errors {
    background: #ffe6e6;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid #ff9999;
    border-radius: 5px;
}

.retailer-form-errors strong {
    color: #cc0000;
    display: block;
    margin-bottom: 10px;
}

.retailer-form-errors ul {
    margin: 0;
    padding-left: 20px;
}

.retailer-form-errors li {
    color: #990000;
    margin-bottom: 5px;
}

/* Section styling */
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.form-section h3 {
    color: #2c3e50;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f1f1;
}

.section-description {
    color: #666;
    font-style: italic;
    margin-top: -5px;
    margin-bottom: 20px;
}

.submit-section {
    text-align: center;
    border-top: 2px solid #f1f1f1;
    background: #f8f9fa;
}

/* Responsive design */
@media (max-width: 768px) {
    .form-group {
        padding: 12px;
    }
    
    .checkbox-option,
    .radio-option {
        margin-bottom: 10px;
    }
    
    .form-section {
        padding: 15px;
        margin-bottom: 20px;
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    margin-left: 10px;
}

.loading-spinner:after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error messages */
.retailer-success-message {
    background: #d4edda !important;
    color: #155724 !important;
    padding: 12px 15px !important;
    border-radius: 5px !important;
    border: 1px solid #c3e6cb !important;
    margin: 15px 0 !important;
}

.retailer-error-message {
    background: #f8d7da !important;
    color: #721c24 !important;
    padding: 12px 15px !important;
    border-radius: 5px !important;
    border: 1px solid #f5c6cb !important;
    margin: 15px 0 !important;
}

/* Form states */
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Checkbox validation */
.form-group.has-error {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% {transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateX(-5px);}
    20%, 40%, 60%, 80% {transform: translateX(5px);}
}

/* Message transitions */
#form-message {
    transition: all 0.3s ease;
}

#form-message.success {
    border-left: 4px solid #28a745;
}

#form-message.error {
    border-left: 4px solid #dc3545;
}