/**
 * Paulto Media Button Style
 * Custom styling for media upload buttons
 * Primary Color: #4E89E8
 */

/* ===================================
   Media Upload Buttons
   =================================== */

/* Save Button - Upload forms */
.video-popup-form .save-button,
.audio-popup-form .save-button,
.album-popup-form .save-button,
button.save-button {
    background-color: #4E89E8 !important;
    border-color: #4E89E8 !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

.video-popup-form .save-button:hover,
.audio-popup-form .save-button:hover,
.album-popup-form .save-button:hover,
button.save-button:hover {
    background-color: #3a6fcc !important;
    border-color: #3a6fcc !important;
    box-shadow: 0 2px 8px rgba(78, 137, 232, 0.3);
}

.video-popup-form .save-button:active,
.audio-popup-form .save-button:active,
.album-popup-form .save-button:active,
button.save-button:active {
    background-color: #2f5fb3 !important;
    border-color: #2f5fb3 !important;
}

/* Create Button - Add Media buttons */
a.wpee-create-button {
    background-color: #4E89E8 !important;
    border-color: #4E89E8 !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

a.wpee-create-button:hover {
    background-color: #3a6fcc !important;
    border-color: #3a6fcc !important;
    box-shadow: 0 2px 8px rgba(78, 137, 232, 0.3);
    text-decoration: none;
}

a.wpee-create-button:active {
    background-color: #2f5fb3 !important;
    border-color: #2f5fb3 !important;
}

/* Photo Upload - Start Button */
.btn.btn-primary.start {
    background-color: #4E89E8 !important;
    border-color: #4E89E8 !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

.btn.btn-primary.start:hover {
    background-color: #3a6fcc !important;
    border-color: #3a6fcc !important;
    box-shadow: 0 2px 8px rgba(78, 137, 232, 0.3);
}

.btn.btn-primary.start:active,
.btn.btn-primary.start:focus {
    background-color: #2f5fb3 !important;
    border-color: #2f5fb3 !important;
}

/* ===================================
   Additional Upload Buttons
   =================================== */

/* Edit Button in Photo Upload */
.btn.btn-success.edit {
    background-color: #4E89E8 !important;
    border-color: #4E89E8 !important;
}

.btn.btn-success.edit:hover {
    background-color: #3a6fcc !important;
    border-color: #3a6fcc !important;
}

/* General Primary Buttons in Media Context */
.profile-user-videos-inner .btn-primary,
.profile-user-audio-inner .btn-primary,
.photo-list-inner .btn-primary {
    background-color: #4E89E8 !important;
    border-color: #4E89E8 !important;
}

.profile-user-videos-inner .btn-primary:hover,
.profile-user-audio-inner .btn-primary:hover,
.photo-list-inner .btn-primary:hover {
    background-color: #3a6fcc !important;
    border-color: #3a6fcc !important;
}

/* ===================================
   Form Submit Buttons
   =================================== */

/* Any submit button in popup forms */
.popup-form button[type="submit"],
.popup-form .save-button,
.popup-wrapper button[type="submit"] {
    background-color: #4E89E8 !important;
    border-color: #4E89E8 !important;
    color: #ffffff !important;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.popup-form button[type="submit"]:hover,
.popup-form .save-button:hover,
.popup-wrapper button[type="submit"]:hover {
    background-color: #3a6fcc !important;
    border-color: #3a6fcc !important;
    box-shadow: 0 2px 8px rgba(78, 137, 232, 0.3);
}

/* Disabled state */
.popup-form button[type="submit"]:disabled,
.popup-form .save-button:disabled,
button.save-button:disabled,
.btn.btn-primary.start:disabled {
    background-color: #a8c5f0 !important;
    border-color: #a8c5f0 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===================================
   Focus States for Accessibility
   =================================== */

.save-button:focus,
.wpee-create-button:focus,
.btn.btn-primary.start:focus {
    outline: 2px solid #4E89E8;
    outline-offset: 2px;
}

/* ===================================
   Upload Progress Bar
   =================================== */

.upload-progress-wrapper {
    margin: 15px 0 20px 0;
    width: 100%;
}

.upload-progress-container {
    width: 100%;
    position: relative;
}

.upload-progress-bar {
    width: 100%;
    height: 30px;
    background-color: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 10px !important;
    
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4E89E8 0%, #5a96f5 100%);
    border-radius: 15px;
    transition: width 0.3s ease;
    box-shadow: 0 2px 4px rgba(78, 137, 232, 0.3);
    position: relative;
    overflow: hidden;
}

/* Animated stripes effect */
.upload-progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: progress-animation 1s linear infinite;
}

@keyframes progress-animation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 30px;
    }
}

.upload-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #333;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 10;
}

/* Progress at 100% */
.upload-progress-fill[style*="width: 100%"] {
    background: linear-gradient(90deg, #28a745 0%, #34ce57 100%);
}

/* Upload button states during upload */
.save-button:disabled {
    cursor: not-allowed;
    position: relative;
}

.save-button:disabled::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: button-loading-spinner 0.6s linear infinite;
}

@keyframes button-loading-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   Photo Upload Buttons
   =================================== */

/* Cancel upload button */
.btn.btn-danger.cancel,
button.cancel {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

.btn.btn-danger.cancel:hover,
button.cancel:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn.btn-danger.cancel:active,
button.cancel:active {
    background-color: #bd2130 !important;
    border-color: #b21f2d !important;
}

/* ===================================
   File Size Hint
   =================================== */

.file-size-hint {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

/* ===================================
   Form Error Messages
   =================================== */

.form-error-message {
    display: block;
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
}
