/* Enhanced Profile Button Styling System
 * Making save/submit buttons more prominent across all profile pages
 * Provides consistent, eye-catching button designs with animations and effects
 */

/* Enhanced Submit Button Base Styles */
.enhanced-profile-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    min-height: 3.5rem;
    background: linear-gradient(135deg, #E87E1E 0%, #EE922B 50%, #F59E0B 100%);
    background-size: 200% 200%;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    font-family: 'MontSemiBold', sans-serif;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 8px 30px rgba(232, 126, 30, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-transform: none;
    letter-spacing: 0.5px;
    animation: breathe 3s ease-in-out infinite;
}

/* Breathing animation to draw attention */
@keyframes breathe {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 8px 30px rgba(232, 126, 30, 0.4),
            0 4px 15px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 
            0 12px 40px rgba(232, 126, 30, 0.6),
            0 6px 20px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Shimmer effect overlay */
.enhanced-profile-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.7s ease;
}

/* Hover states */
.enhanced-profile-submit:hover {
    background: linear-gradient(135deg, #D97706 0%, #E87E1E 50%, #EE922B 100%);
    background-position: 100% 100%;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 15px 50px rgba(232, 126, 30, 0.6),
        0 8px 25px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    animation: none; /* Stop breathing on hover */
}

.enhanced-profile-submit:hover::before {
    left: 100%;
}

/* Active/pressed state */
.enhanced-profile-submit:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(232, 126, 30, 0.5),
        0 4px 15px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Focus state for accessibility */
.enhanced-profile-submit:focus {
    outline: none;
    box-shadow: 
        0 15px 50px rgba(232, 126, 30, 0.6),
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 0 0 4px rgba(232, 126, 30, 0.3);
}

/* Icon styles within button */
.enhanced-profile-submit .button-icon {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.enhanced-profile-submit:hover .button-icon {
    transform: translateX(2px) scale(1.1);
}

/* Text styles within button */
.enhanced-profile-submit .button-text {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Loading state styles */
.enhanced-profile-submit.loading {
    pointer-events: none;
    background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 50%, #4B5563 100%);
    animation: pulse 1.5s ease-in-out infinite;
}

.enhanced-profile-submit .loading-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.75rem;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Success state animation */
.enhanced-profile-submit.success {
    background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%);
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Size variants */
.enhanced-profile-submit.large {
    padding: 1.25rem 3rem;
    min-height: 4rem;
    font-size: 1.2rem;
}

.enhanced-profile-submit.small {
    padding: 0.75rem 2rem;
    min-height: 3rem;
    font-size: 1rem;
}

/* Full width variant */
.enhanced-profile-submit.full-width {
    width: 100%;
    justify-content: center;
}

/* Secondary variant (less prominent but still enhanced) */
.enhanced-profile-submit.secondary {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 50%, #374151 100%);
    box-shadow: 
        0 6px 20px rgba(107, 114, 128, 0.3),
        0 3px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.enhanced-profile-submit.secondary:hover {
    background: linear-gradient(135deg, #4B5563 0%, #374151 50%, #1F2937 100%);
    box-shadow: 
        0 10px 30px rgba(107, 114, 128, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

/* Disabled state */
.enhanced-profile-submit:disabled {
    background: linear-gradient(135deg, #D1D5DB 0%, #9CA3AF 50%, #6B7280 100%);
    color: #4B5563;
    cursor: not-allowed;
    transform: none;
    animation: none;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.enhanced-profile-submit:disabled:hover {
    transform: none;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .enhanced-profile-submit {
        box-shadow: 
            0 8px 30px rgba(232, 126, 30, 0.3),
            0 4px 15px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .enhanced-profile-submit:hover {
        box-shadow: 
            0 15px 50px rgba(232, 126, 30, 0.4),
            0 8px 25px rgba(0, 0, 0, 0.4),
            inset 0 2px 0 rgba(255, 255, 255, 0.2);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .enhanced-profile-submit {
        padding: 1rem 2rem;
        min-height: 3.25rem;
        font-size: 1.05rem;
    }
    
    .enhanced-profile-submit.large {
        padding: 1.125rem 2.5rem;
        min-height: 3.75rem;
        font-size: 1.15rem;
    }
    
    .enhanced-profile-submit.small {
        padding: 0.875rem 1.75rem;
        min-height: 2.75rem;
        font-size: 0.95rem;
    }
}

/* Form integration styles */
.form-actions .enhanced-profile-submit {
    margin-top: 1.5rem;
}

.form-submit-section .enhanced-profile-submit {
    margin-top: 1rem;
}

/* Button wrapper enhancements */
.submit-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.submit-button-wrapper .enhanced-profile-submit {
    margin: 0;
}

/* Animation delays for multiple buttons */
.enhanced-profile-submit:nth-child(1) { animation-delay: 0s; }
.enhanced-profile-submit:nth-child(2) { animation-delay: 0.1s; }
.enhanced-profile-submit:nth-child(3) { animation-delay: 0.2s; }

/* High contrast mode support */
@media (prefers-contrast: high) {
    .enhanced-profile-submit {
        border: 3px solid #000000;
        background: #E87E1E;
        box-shadow: none;
    }
    
    .enhanced-profile-submit:hover {
        background: #D97706;
        border: 3px solid #000000;
        box-shadow: none;
    }
    
    .enhanced-profile-submit:focus {
        outline: 4px solid #000000;
        outline-offset: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .enhanced-profile-submit {
        animation: none;
        transition: background-color 0.2s ease, box-shadow 0.2s ease;
    }
    
    .enhanced-profile-submit::before {
        display: none;
    }
    
    .enhanced-profile-submit:hover {
        transform: none;
    }
    
    .enhanced-profile-submit:active {
        transform: none;
    }
}

/* Print styles */
@media print {
    .enhanced-profile-submit {
        background: #E87E1E !important;
        color: white !important;
        box-shadow: none !important;
        animation: none !important;
    }
}
