/* Member Submission Gallery - Frontend Styles */

.msg-submission-form-wrapper {
    max-width: 800px;
    margin: 2rem auto;
}

.msg-expand-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.msg-expand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

.msg-expand-header:hover {
    background: linear-gradient(135deg, #135e96 0%, #0f4c7a 100%);
}

.msg-expand-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.msg-expand-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.msg-expand-container.expanded .msg-expand-toggle {
    transform: rotate(180deg);
}

.msg-toggle-icon {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #ffffff;
    display: block;
}

.msg-expand-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.msg-expand-container.expanded .msg-expand-content {
    max-height: 5000px;
    transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

.msg-form {
    width: 100%;
    padding: 2rem;
}

.msg-form-group {
    margin-bottom: 1.5rem;
}

.msg-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.required {
    color: #dc3232;
}

.msg-input,
.msg-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.msg-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.msg-file-input {
    width: 100%;
    padding: 0.5rem;
    border: 2px dashed #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.msg-file-input:hover {
    border-color: #2271b1;
}

.msg-help-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.msg-image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.msg-image-preview-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 1;
}

.msg-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.msg-youtube-links-container {
    margin-bottom: 1rem;
}

.msg-youtube-link-row {
    margin-bottom: 0.5rem;
}

.msg-youtube-input {
    width: 100%;
}

.msg-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.msg-btn-primary {
    background: #2271b1;
    color: #ffffff;
}

.msg-btn-primary:hover {
    background: #135e96;
}

.msg-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.msg-btn-secondary {
    background: #f0f0f1;
    color: #2c3338;
}

.msg-btn-secondary:hover {
    background: #dcdcde;
}

.msg-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: msg-spin 0.6s linear infinite;
}

@keyframes msg-spin {
    to { transform: rotate(360deg); }
}

.msg-response {
    margin-top: 1rem;
}

.msg-notice {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.msg-notice.msg-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.msg-notice.msg-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.msg-notice.msg-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Responsive */
@media (max-width: 768px) {
    .msg-submission-form-wrapper {
        margin: 1rem;
    }
    
    .msg-expand-header {
        padding: 1rem 1.5rem;
    }
    
    .msg-expand-title {
        font-size: 1.25rem;
    }
    
    .msg-form {
        padding: 1rem;
    }
    
    .msg-image-preview {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}
