/**
 * Brand Edit Modal Styles
 */

.brand-edit-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.brand-edit-modal-overlay.show {
    display: flex;
}

.brand-edit-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.brand-edit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: white;
}

.brand-edit-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.brand-edit-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.brand-edit-modal-close:hover {
    color: #333;
}

.brand-edit-modal-body {
    padding: 24px;
}

.brand-edit-form-group {
    margin-bottom: 20px;
}

.brand-edit-form-group:last-child {
    margin-bottom: 0;
}

.brand-edit-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.brand-edit-form-label.required::after {
    content: ' *';
    color: #f5222d;
}

.brand-edit-form-input,
.brand-edit-form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.brand-edit-form-input:focus,
.brand-edit-form-textarea:focus {
    outline: none;
    border-color: #FF6A00;
    box-shadow: 0 0 0 2px rgba(255, 106, 0, 0.1);
}

.brand-edit-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.brand-edit-logo-upload {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-edit-logo-preview {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 2px solid #f0f0f0;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-edit-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-edit-logo-upload-btn {
    padding: 10px 16px;
    background: #FF6A00;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.brand-edit-logo-upload-btn:hover {
    background: #E65F00;
}

.brand-edit-logo-input {
    display: none;
}

.brand-edit-form-help {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.brand-edit-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 24px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.brand-edit-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.brand-edit-btn-cancel {
    background: white;
    color: #666;
    border: 1px solid #d9d9d9;
}

.brand-edit-btn-cancel:hover {
    border-color: #999;
    color: #333;
}

.brand-edit-btn-submit {
    background: #FF6A00;
    color: white;
}

.brand-edit-btn-submit:hover:not(:disabled) {
    background: #E65F00;
}

.brand-edit-btn-submit:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
}

.brand-edit-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand-edit-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast 通知样式 */
.brand-edit-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    z-index: 99999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px;
}

.brand-edit-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.brand-edit-toast-success {
    background: #f0fdf4;
    color: #10b981;
    border: 1px solid #dcfce7;
}

.brand-edit-toast-error {
    background: #fff1f0;
    color: #f5222d;
    border: 1px solid #ffccc7;
}

@media (max-width: 768px) {
    .brand-edit-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

.brand-edit-error {
    padding: 12px;
    background: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: 6px;
    color: #f5222d;
    font-size: 14px;
    margin-bottom: 16px;
}

.brand-edit-success {
    padding: 12px;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 6px;
    color: #10b981;
    font-size: 14px;
    margin-bottom: 16px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .brand-edit-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .brand-edit-modal-header {
        padding: 16px;
    }
    
    .brand-edit-modal-body {
        padding: 16px;
    }
    
    .brand-edit-modal-footer {
        padding: 16px;
        flex-direction: column-reverse;
    }
    
    .brand-edit-btn {
        width: 100%;
    }
    
    .brand-edit-logo-upload {
        flex-direction: column;
        align-items: flex-start;
    }
}
