/**
 * Business Profile Styles - Phase 1 Implementation
 * Brand-consistent, responsive design for customer profile update form
 * Royal Farms Brand Colors: #13560c (primary), #29c51b (secondary)
 */

/* Font Awesome Icons for enhanced UI */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

/* Brand color variables */
:root {
    --royal-primary: #13560c;
    --royal-secondary: #29c51b;
    --royal-light: #f0f8f0;
    --text-primary: #2c3e50;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --shadow-light: rgba(0,0,0,0.08);
    --shadow-medium: rgba(0,0,0,0.12);
}

/* Profile Page Styles - Brand Consistent & Responsive */

/* Profile Header */
.profile-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #13560c 0%, #29c51b 100%);
    color: white;
    border-radius: 12px;
    margin-top: 1rem;
}

.profile-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.profile-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    opacity: 0.9;
    margin-bottom: 0;
    font-weight: 300;
}

/* Form Sections */
.form-section {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 6px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.section-title {
    color: #13560c;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f8f0;
}

.section-title i {
    color: #29c51b;
    font-size: 1.2em;
}

.section-content {
    padding-top: 1rem;
}

/* Form Controls Enhancement */
.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    border-color: #29c51b;
    box-shadow: 0 0 0 0.2rem rgba(41, 197, 27, 0.15);
    background: #f8fff8;
}

.form-control:disabled {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Logo Upload Styles */
.logo-upload-container {
    position: relative;
}

.logo-preview {
    background: #f8f9fa;
    border: 3px dashed #29c51b;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.logo-preview:hover {
    border-color: #13560c;
    background: #f0f8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(19, 86, 12, 0.1);
}

.logo-image {
    max-height: 100px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(19, 86, 12, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    gap: 0.5rem;
}

.logo-preview:hover .logo-overlay {
    opacity: 1;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #6c757d;
}

.logo-placeholder i {
    font-size: 2.5rem;
    color: #29c51b;
}

.logo-placeholder span {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Delivery Preferences Styles */
.delivery-preferences {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.delivery-option {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
}

.delivery-option:hover {
    border-color: #29c51b;
    background: #f8fff8;
    transform: translateX(4px);
    box-shadow: 0 2px 10px rgba(41, 197, 27, 0.1);
}

.delivery-option.active {
    border-color: #13560c;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    box-shadow: 0 4px 15px rgba(19, 86, 12, 0.15);
    transform: translateX(4px);
}

.delivery-option.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #13560c;
    border-radius: 2px 0 0 2px;
}

.delivery-option-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.delivery-icon {
    font-size: 1.5rem;
    color: #29c51b;
    min-width: 24px;
    transition: color 0.3s ease;
}

.delivery-option.active .delivery-icon {
    color: #13560c;
}

.delivery-details {
    flex: 1;
}

.delivery-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.delivery-subtitle {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Form Actions */
.form-actions {
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid #e9ecef;
}

.btn-primary {
    background: linear-gradient(135deg, #13560c 0%, #29c51b 100%);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(19, 86, 12, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0f4509 0%, #22a518 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(19, 86, 12, 0.3);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(41, 197, 27, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-header {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    .form-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .logo-preview {
        min-height: 120px;
        padding: 1.5rem;
    }
    
    .delivery-option {
        padding: 1rem;
    }
    
    .delivery-option-content {
        gap: 0.75rem;
    }
    
    .delivery-icon {
        font-size: 1.25rem;
    }
    
    .form-actions {
        padding: 1rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .profile-header {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
    }
    
    .form-section {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .delivery-preferences {
        gap: 0.5rem;
    }
    
    .delivery-option {
        padding: 0.75rem;
    }
    
    .logo-preview {
        min-height: 100px;
        padding: 1rem;
    }
}

/* Visual Balance & Accessibility */
.form-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Focus Management for Accessibility */
.form-control:focus,
.delivery-option:focus,
.logo-preview:focus {
    outline: 2px solid var(--royal-secondary);
    outline-offset: 2px;
}

/* Loading States */
.form-section.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Animation for smooth transitions */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: slideIn 0.6s ease-out;
}

.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; }
