/**
 * Media Gathering Upload Form Styles
 * Mobile-first, stacked form design
 */

/* Container */
.mg-upload-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.mg-upload-form-wrapper {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Title and Description */
.mg-form-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.mg-form-description {
    margin: 0 0 30px 0;
    font-size: 16px;
    color: #666;
    line-height: 1.5;
}

/* Form Fields */
.mg-form-field {
    margin-bottom: 24px;
}

.mg-label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.mg-required {
    color: #d63638;
}

.mg-input,
.mg-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.mg-input:focus,
.mg-textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.mg-textarea {
    resize: vertical;
    min-height: 80px;
}

/* File Input */
.mg-file-input-wrapper {
    position: relative;
}

.mg-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mg-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: #f0f0f1;
    border: 2px dashed #8c8f94;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
}

.mg-file-label:hover {
    background: #e8e8e9;
    border-color: #2271b1;
}

.mg-file-input:focus + .mg-file-label {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.mg-file-icon {
    font-size: 32px;
}

.mg-file-text {
    font-size: 18px;
    font-weight: 500;
    color: #2271b1;
}

.mg-file-info {
    margin-top: 12px;
}

.mg-file-selected {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.mg-file-limits {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* Progress Section */
.mg-progress-section {
    margin: 24px 0;
    padding: 20px;
    background: #f0f6fc;
    border-radius: 6px;
    border: 1px solid #c3dafe;
}

.mg-progress-bar-wrapper {
    margin-bottom: 12px;
}

.mg-progress-bar {
    position: relative;
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
}

.mg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1 0%, #135e96 100%);
    border-radius: 15px;
    transition: width 0.3s ease;
    width: 0%;
}

.mg-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mg-upload-status {
    text-align: center;
}

.mg-status-message {
    margin: 0;
    font-size: 14px;
    color: #135e96;
    font-weight: 500;
}

/* Messages */
.mg-messages {
    margin: 20px 0;
}

.mg-message {
    padding: 16px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
}

.mg-message-success {
    background: #d7f0d7;
    border: 1px solid #00a32a;
    color: #00a32a;
}

.mg-message-error {
    background: #fcf0f1;
    border: 1px solid #d63638;
    color: #d63638;
}

/* Submit Button */
.mg-form-actions {
    margin-top: 30px;
}

.mg-submit-button {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: #2271b1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mg-submit-button:hover {
    background: #135e96;
}

.mg-submit-button:active {
    background: #0a4b78;
}

.mg-submit-button:disabled {
    background: #8c8f94;
    cursor: not-allowed;
}

.mg-spinner {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

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

/* Tablet and Desktop */
@media (min-width: 768px) {
    .mg-upload-container {
        padding: 40px 20px;
    }
    
    .mg-upload-form-wrapper {
        padding: 40px;
    }
    
    .mg-form-title {
        font-size: 28px;
    }
}

/* Accessibility */
.mg-input:invalid,
.mg-textarea:invalid {
    border-color: #d63638;
}

.mg-input:focus:invalid,
.mg-textarea:focus:invalid {
    box-shadow: 0 0 0 1px #d63638;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mg-upload-form-wrapper {
        border: 2px solid #000;
    }
    
    .mg-input,
    .mg-textarea {
        border-width: 2px;
    }
}

