/* ===================================================================
   UPLOADS SYSTEM - STYLING
   User file uploads with pink theme
   =================================================================== */

/* ===================================================================
   UPLOADS SECTION BASE STYLING
   =================================================================== */
.uploads-section {
    margin-top: 20px;
    margin-bottom: 25px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.uploads-section .section-title {
    color: #FF9BC7;
}

.uploads-container {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 155, 199, 0.4);
    box-shadow: 0 0 1px rgba(255, 155, 199, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
    font-family: "Segoe UI", Arial, sans-serif;
    margin: 0 -15px;
}

/* ===================================================================
   UPLOAD FORM STYLING
   =================================================================== */
.upload-form {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

/* Upload form intro */
.upload-form-intro {
    background: rgba(255, 105, 180, 0.1);
    border: 1px solid rgba(255, 105, 180, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.upload-form-intro p {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

.upload-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.upload-form-group {
    margin-bottom: 20px;
    flex: 1;
}

.upload-form-group label {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    font-family: "Segoe UI", Arial, sans-serif;
}

.upload-form-group input {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: "Segoe UI", Arial, sans-serif;
    transition: all 0.3s ease;
}

.upload-form-group input:focus {
    outline: none;
    border-color: #ff9bc7;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Message/Description textarea */
.upload-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.upload-textarea:focus {
    outline: none;
    border-color: #ff9bc7;
    background-color: rgba(255, 255, 255, 0.08);
}

.upload-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Form hint text */
.upload-form-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
    line-height: 1.4;
    font-style: italic;
}

/* ===================================================================
   FILE UPLOAD AREA STYLING
   =================================================================== */
.user-file-upload-area {
    border: 2px dashed rgba(255, 155, 199, 0.3);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    margin-bottom: 20px;
}

.user-file-upload-area:hover {
    border-color: rgba(255, 155, 199, 0.5);
    background-color: rgba(255, 255, 255, 0.05);
}

.user-file-upload-area.dragover {
    border-color: #ff9bc7;
    background-color: rgba(255, 155, 199, 0.1);
    transform: scale(1.02);
}

/* File selected state */
.user-file-upload-area.file-selected {
    border-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
}

.user-file-upload-area.file-selected:hover {
    border-color: #45a049;
    background-color: rgba(76, 175, 80, 0.15);
}

.user-upload-icon {
    font-size: 40px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.user-upload-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.user-upload-link {
    color: #ff9bc7;
    cursor: pointer;
    text-decoration: underline;
}

.user-upload-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

/* ===================================================================
   FILE PREVIEW STYLING
   =================================================================== */
.user-file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0; /* Allow shrinking */
    overflow: hidden; /* Prevent overflow */
}

/* Ensure hidden state always wins with higher specificity */
.user-file-upload-area .user-file-preview.hidden {
    display: none !important;
}

.user-preview-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1; /* Take available space */
    min-width: 0; /* Allow shrinking */
    overflow: hidden; /* Prevent overflow */
    margin-right: 12px; /* Space from remove button */
}

#userPreviewName {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}

#userPreviewSize {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.user-remove-file {
    background: none;
    border: none;
    color: #ff8282;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    flex-shrink: 0; /* Prevent shrinking */
    min-width: 24px; /* Ensure minimum clickable area */
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-remove-file:hover {
    background-color: rgba(255, 130, 130, 0.2);
}

/* ===================================================================
   UPLOAD SUBMIT BUTTON
   =================================================================== */
.upload-submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #ff9bc7;
    border: none;
    border-radius: 8px;
    color: #000000;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Segoe UI", Arial, sans-serif;
}

.upload-submit-btn:hover {
    background-color: #e880b0;
    transform: translateY(-1px);
}

.upload-submit-btn:disabled {
    background-color: rgba(255, 155, 199, 0.3);
    cursor: not-allowed;
    transform: none;
}

/* ===================================================================
   UPLOAD STATUS MESSAGES
   =================================================================== */
.upload-error {
    background-color: rgba(255, 130, 130, 0.1);
    border: 1px solid rgba(255, 130, 130, 0.3);
    color: #ff8282;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
    font-family: "Segoe UI", Arial, sans-serif;
}

.upload-success {
    background-color: rgba(135, 230, 135, 0.1);
    border: 1px solid rgba(135, 230, 135, 0.3);
    color: #87e687;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* Enhanced success message styling */
.success-message {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(139, 195, 74, 0.15));
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    color: #ffffff;
    font-family: "Segoe UI", Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
    animation: successSlideIn 0.4s ease-out;
    transition: opacity 0.3s ease;
}

/* Progress message styling */
.progress-message {
    background: linear-gradient(135deg, rgba(255, 155, 199, 0.15), rgba(255, 105, 180, 0.15));
    border: 2px solid rgba(255, 155, 199, 0.4);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    color: #ffffff;
    font-family: "Segoe UI", Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(255, 155, 199, 0.2);
    animation: progressSlideIn 0.3s ease-out;
}

.upload-progress-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-progress-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #ff9bc7;
}

.upload-progress-icon {
    font-size: 20px;
    animation: progressPulse 1.5s ease-in-out infinite;
}

.upload-progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff9bc7, #ff69b4);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-progress-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShimmer 2s ease-in-out infinite;
}

.upload-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    font-size: 13px;
}

.upload-progress-text {
    font-weight: 600;
    color: #ff9bc7;
}

.upload-speed-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.upload-eta-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-style: italic;
}

.success-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #4CAF50;
}

.success-icon {
    font-size: 24px;
    animation: successBounce 0.6s ease-out;
}

.success-details {
    margin-top: 15px;
}

.success-filename {
    background: rgba(76, 175, 80, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 15px;
    border-left: 4px solid #4CAF50;
}

.success-filename strong {
    color: #4CAF50;
}

.success-info {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.success-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.success-emoji {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

.success-actions {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-top: 15px;
}

.success-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.success-tip-icon {
    font-size: 14px;
}

.success-tip code {
    background: rgba(255, 155, 199, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #ff9bc7;
    font-weight: 600;
}

/* Error message styling */
.error-message {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15), rgba(255, 87, 34, 0.15));
    border: 2px solid rgba(244, 67, 54, 0.4);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    color: #ff6b6b;
    font-family: "Segoe UI", Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.2);
    animation: errorShake 0.5s ease-out;
}

/* Success animations */
@keyframes successSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes progressSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes progressShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes successBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

@keyframes celebrationBounce {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    75% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

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

/* Upload guidelines section */
.upload-guidelines {
    background: rgba(255, 105, 180, 0.05);
    border: 1px solid rgba(255, 105, 180, 0.15);
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
}

.upload-guidelines h3 {
    margin: 0 0 15px 0;
    color: #ff9bc7;
    font-size: 16px;
    font-weight: 600;
}

.upload-guidelines ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.upload-guidelines li {
    margin-bottom: 8px;
    padding-left: 5px;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

.upload-guidelines li::before {
    content: "•";
    color: #ff9bc7;
    font-weight: bold;
    position: absolute;
    left: -15px;
}

.upload-guidelines li strong {
    color: #ff9bc7;
}

/* ===================================================================
   UPLOADS LOGIN REQUIRED STATE
   =================================================================== */
.uploads-login-required {
    text-align: center;
    padding: 40px 20px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.uploads-login-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    opacity: 0.6;
}

.uploads-login-title {
    font-size: 20px;
    font-weight: 600;
    color: #ff9bc7;
    margin-bottom: 10px;
    font-family: "Segoe UI", Arial, sans-serif;
}

.uploads-login-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    font-family: "Segoe UI", Arial, sans-serif;
}

.uploads-login-btn {
    background-color: #ff9bc7;
    color: #000000;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Segoe UI", Arial, sans-serif;
}

.uploads-login-btn:hover {
    background-color: #e880b0;
    transform: translateY(-1px);
}

/* ===================================================================
   RESPONSIVE DESIGN ADJUSTMENTS
   =================================================================== */

/* Desktop */
@media (min-width: 1024px) {
    .uploads-container {
        padding: 30px;
        margin: 0 -20px;
        border: 1px solid rgba(255, 155, 199, 0.4);
        box-shadow: 0 0 1px rgba(255, 155, 199, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .uploads-container {
        padding: 35px;
        margin: 0 -25px;
        border: 1px solid rgba(255, 155, 199, 0.4);
        box-shadow: 0 0 1px rgba(255, 155, 199, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .uploads-container {
        padding: 25px;
        margin: 0 -12px;
        border: 1px solid rgba(255, 155, 199, 0.4);
        box-shadow: 0 0 1px rgba(255, 155, 199, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
    }

    .upload-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .uploads-container {
        padding: 16px;
        margin: 0 -8px;
        border: 1px solid rgba(255, 155, 199, 0.4);
        box-shadow: 0 0 1px rgba(255, 155, 199, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
    }

    .upload-form {
        padding: 20px;
    }

    .upload-form-row {
        flex-direction: column;
        gap: 0;
    }

    .user-file-upload-area {
        padding: 20px;
    }

    .user-upload-icon {
        font-size: 32px;
    }

    .user-upload-text {
        font-size: 13px;
    }
    
    /* Progress bar responsive adjustments */
    .upload-progress-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .upload-progress-header {
        font-size: 14px;
    }
    
    .upload-progress-icon {
        font-size: 18px;
    }

    .uploads-login-required {
        padding: 30px 15px;
    }

    .uploads-login-icon {
        width: 40px;
        height: 40px;
        margin: 0 auto 15px;
    }

    .uploads-login-title {
        font-size: 18px;
    }

    .uploads-login-message {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .uploads-login-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .uploads-container {
        padding: 12px;
        margin: 0 -5px;
        border: 1px solid rgba(255, 155, 199, 0.4);
        box-shadow: 0 0 1px rgba(255, 155, 199, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
    }

    .upload-form {
        padding: 15px;
    }

    .user-file-upload-area {
        padding: 15px;
    }
}