/**
 * CF7 Artist Submissions - Common Design System & Shared Component Library
 *
 * Foundational design system providing consistent styling components across
 * all plugin interfaces including dashboard, settings, admin, and action
 * management with modern responsive design patterns and accessibility.
 *
 * Features:
 * • Comprehensive button system with primary, secondary, ghost, and icon variants
 * • Modal overlay system with backdrop blur and smooth animations
 * • Gradient header system for consistent branding across interfaces
 * • Form component library with modern input styling and focus states
 * • Email interface components for sending, preview, and template management
 * • Loading states and animation system with smooth transitions
 * • Navigation tab system for consistent interface organization
 * • Responsive design patterns with mobile-first approach
 *
 * @package CF7_Artist_Submissions
 * @subpackage Assets/CSS
 * @since      1.0.0
 * @version    1.0.0
 */

/* ============================================================================
   EMAIL INTERFACE COMPONENTS SECTION
   ============================================================================ */

/**
 * Email Management Interface
 * 
 * Shared components for email sending, preview, and template management.
 * Used across admin interface, settings, and other email-related features.
 */

/* Email Interface Container */
.cf7-email-sending-interface {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
}

/* Email Form Fields */
.cf7-email-field {
    margin-bottom: 15px;
}

.cf7-email-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Email Action Controls */
.cf7-email-actions {
    display: flex;
    align-items: center;
}

.cf7-email-actions .spinner {
    float: none;
    margin-left: 10px;
}

.cf7-email-actions button {
    margin-right: 10px;
}

/* Email Status Messages */
#cf7_email_message {
    margin: 10px 0 0 0;
    padding: 5px 10px;
}

/* Email Preview Modal */
#cf7-email-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(0,0,0,0.7);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cf7-email-preview-content {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.cf7-email-preview-subject {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.cf7-email-preview-body {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 3px;
}

/* Email Preview Actions */
.cf7-email-preview-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    gap: 10px;
}

/* Email Log Container */
.cf7-email-log {
    margin-top: 20px;
}

/* Template Preview Components */
.cf7-preview-notice {
    background: #e3f2fd;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #1565c0;
    border-left: 4px solid #2196f3;
    font-size: 14px;
    line-height: 1.5;
}

.cf7-preview-template-name {
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.cf7-preview-subject {
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007cba;
}

.cf7-preview-subject strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.cf7-preview-body {
    margin-bottom: 0;
}

.cf7-preview-body strong {
    color: #333;
    display: block;
    margin-bottom: 10px;
}


/* ============================================================================
   BUTTON SYSTEM SECTION
   ============================================================================ */

/**
 * Base Button Styling
 * 
 * Consistent button design system used throughout the plugin.
 * Provides flexible foundation for all button variants.
 */
.cf7-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
    min-height: 44px;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cf7-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    flex-shrink: 0;
}

/* Button Variants */
.cf7-btn-primary {
    background: #2271b1;
    color: white;
}

.cf7-btn-primary:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.cf7-btn-secondary {
    background: #4299e1;
    color: white;
}

.cf7-btn-secondary:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.cf7-btn-ghost {
    background: transparent;
    color: #718096;
    border: 1px solid #e2e8f0;
}

.cf7-btn-ghost:hover {
    background: #f7fafc;
    color: #4a5568;
}

/* Header Context Buttons (for gradient backgrounds) */
.cf7-header-context .cf7-btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cf7-header-context .cf7-btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.cf7-header-context .cf7-btn-secondary {
    background: #48bb78;
    color: white;
}

.cf7-header-context .cf7-btn-secondary:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.cf7-header-context .cf7-btn-ghost {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.cf7-header-context .cf7-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Icon Button Variant */
.cf7-btn-icon {
    padding: 0.75rem;
    min-height: 44px;
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 101;
}

.cf7-btn-icon:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.cf7-btn-icon.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* ============================================================================
   MODAL SYSTEM SECTION
   ============================================================================ */

/**
 * Modal Overlay System
 * 
 * Consistent modal dialog system used for settings, actions, and previews.
 * Features backdrop blur, smooth animations, and responsive design.
 */
.cf7-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cf7-modal.show {
    opacity: 1;
    visibility: visible;
}

.cf7-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 90vw;
    max-height: 90vh;
    width: 600px;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.cf7-modal.show .cf7-modal-content {
    transform: scale(1) translateY(0);
}

.cf7-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.cf7-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
}

/**
 * Modal Close Button (Header X Button)
 * 
 * Clean, accessible close button with hover states.
 * Positioned in the top-right corner of modal headers.
 * Only affects the header close button, not footer buttons.
 */
.cf7-modal-header .cf7-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #718096;
    padding: 0.5rem;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cf7-modal-header .cf7-modal-close:hover {
    background: #e2e8f0;
    color: #4a5568;
    transform: scale(1.05);
}

.cf7-modal-header .cf7-modal-close:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.cf7-modal-header .cf7-modal-close .dashicons {
    font-size: 1.2rem;
    width: 1.2rem;
    height: 1.2rem;
}

/**
 * Modal Footer Close Button
 * 
 * Standard button styling for the footer "Close Preview" button.
 * Ensures proper contrast and spacing.
 */
.cf7-modal-footer .cf7-btn.cf7-modal-close {
    background: #6b7280;
    color: white;
    border: 1px solid #6b7280;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    text-decoration: none;
    line-height: 1;
}

.cf7-modal-footer .cf7-btn.cf7-modal-close:hover {
    background: #4b5563;
    border-color: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    color: white;
}

.cf7-modal-footer .cf7-btn.cf7-modal-close:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.cf7-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
}

.cf7-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.cf7-modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.cf7-modal-btn.cf7-btn-primary {
    background: #3b82f6;
    color: white;
}

.cf7-modal-btn.cf7-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.cf7-modal-btn.cf7-btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.cf7-modal-btn.cf7-btn-secondary:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

/* ============================================================================
   GRADIENT HEADERS SECTION
   ============================================================================ */

/**
 * Common Gradient Header System
 * 
 * Consistent gradient header design used across dashboard, settings,
 * tabs, and other major interface sections.
 */
.cf7-gradient-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    margin: 0 -20px 2rem -20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    gap: 2rem;
    position: relative;
}

.cf7-header-content {
    flex: 1;
}

.cf7-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

.cf7-header-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
    line-height: 1.2;
}

.cf7-header-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

/* ============================================================================
   FORM COMPONENTS SECTION
   ============================================================================ */

/**
 * Form Input System
 * 
 * Consistent form styling across all interfaces.
 */
.cf7-form-group {
    margin-bottom: 1.5rem;
}

.cf7-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.cf7-form-input,
.cf7-form-select,
.cf7-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.cf7-form-input:focus,
.cf7-form-select:focus,
.cf7-form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cf7-form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ============================================================================
   LOADING STATES & ANIMATIONS SECTION
   ============================================================================ */

/**
 * Loading and Animation System
 */
.cf7-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: cf7-spin 1s linear infinite;
}

/**
 * Modal Loading Content
 * 
 * Centered loading message with proper icon spinning animation.
 * Used inside modal content areas for loading states.
 */
.cf7-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: #718096;
}

.cf7-modal-loading .dashicons {
    font-size: 2rem;
    width: 2rem;
    height: 2rem;
    margin-bottom: 1rem;
    animation: cf7-spin 1s linear infinite;
}

.cf7-modal-loading-text {
    font-size: 1rem;
    font-weight: 500;
}

/**
 * Modal Error Messages
 * 
 * Error styling for modal content areas.
 */
.cf7-modal .cf7-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    margin: 1rem 0;
}

.cf7-modal .cf7-error .dashicons {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/**
 * Spinning Animation
 * 
 * Applied to icons for loading states. Only spins the element it's applied to.
 */
.cf7-spin {
    animation: cf7-spin 1s linear infinite;
}

@keyframes cf7-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes cf7-slide-in {
    0% { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.cf7-fade-in {
    animation: cf7-fadeIn 0.3s ease-in;
}

@keyframes cf7-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   NAVIGATION TABS SECTION
   ============================================================================ */

/**
 * Navigation Tab System
 * 
 * Consistent tab navigation used across settings, admin, and other interfaces.
 */
.cf7-settings-nav {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e1e5e9;
}

.cf7-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cf7-nav-tabs::-webkit-scrollbar {
    display: none;
}

.cf7-nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #646970;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
    background: transparent;
    white-space: nowrap;
    min-width: max-content;
}

.cf7-nav-tab:hover {
    color: #2271b1;
    background-color: rgba(34, 113, 177, 0.05);
    text-decoration: none;
}

.cf7-nav-tab.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    background-color: rgba(34, 113, 177, 0.05);
}

.cf7-nav-tab .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.cf7-nav-tab .tab-label {
    font-size: 0.875rem;
}

/* Settings variant with different colors */
.cf7-settings-nav .cf7-nav-tab:hover {
    color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
}

.cf7-settings-nav .cf7-nav-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
}

/* ============================================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATION SECTION
   ============================================================================ */

/**
 * Mobile Responsive Design
 */
@media (max-width: 768px) {
    .cf7-gradient-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .cf7-header-title {
        font-size: 2rem;
    }
    
    .cf7-header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .cf7-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .cf7-modal-content {
        width: 95vw;
        margin: 1rem;
    }
    
    .cf7-modal-header,
    .cf7-modal-body,
    .cf7-modal-footer {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .cf7-gradient-header {
        margin: 0 -10px 1rem -10px;
        padding: 1rem;
    }
    
    .cf7-header-title {
        font-size: 1.5rem;
    }
    
    .cf7-header-subtitle {
        font-size: 1rem;
    }
    
    .cf7-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        min-height: 36px;
    }
}

/* ============================================================================
   ARTISTIC MEDIUMS FORM FIELD SECTION
   ============================================================================ */

/**
 * Mediums Form Field
 * 
 * Custom Contact Form 7 field for selecting artistic mediums with 
 * multiple checkbox interface and visual medium representation.
 */

.cf7as-mediums-wrapper {
    margin: 15px 0;
}

.cf7as-mediums-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.cf7as-mediums-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.cf7as-medium-checkbox {
    display: flex;
    align-items: center; /* Keep center alignment for vertical centering */
    padding: 8px 12px;
    background: var(--medium-bg, #f0f0f1);
    color: var(--medium-text, #1d2327);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-size: 13px;
    min-width: 0; /* Allow flex item to shrink */
    min-height: 36px; /* Minimum height for wrapped text with better spacing */
}

.cf7as-medium-checkbox .cf7as-medium-name {
    flex: 1;
    min-width: 0; /* Allow text to shrink */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal; /* Allow text to wrap */
    line-height: 1.3;
    display: flex;
    align-items: center; /* Center text vertically within its container */
    min-height: 20px; /* Ensure minimum height for single line */
}

.cf7as-medium-checkbox input[type="checkbox"] {
    flex-shrink: 0; /* Prevent checkbox from shrinking */
    margin-right: 8px;
    margin-left: 0;
    align-self: center; /* Ensure checkbox stays centered regardless of text height */
}

.cf7as-medium-checkbox .cf7as-checkbox-mark {
    flex-shrink: 0; /* Prevent checkmark from shrinking */
    align-self: center; /* Center the checkmark */
}

.cf7as-medium-checkbox:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.cf7as-medium-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.cf7as-checkbox-mark {
    width: 16px;
    height: 16px;
    border: 2px solid var(--medium-text, #1d2327);
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

/* Fallback checkbox mark styling without CSS variables */
.cf7as-submission-modal .cf7as-checkbox-mark {
    border: 2px solid #1d2327 !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

.cf7as-medium-checkbox input[type="checkbox"]:checked + .cf7as-checkbox-mark,
.cf7as-checkbox-mark.checked {
    background-color: var(--medium-text, #1d2327) !important;
}

.cf7as-medium-checkbox input[type="checkbox"]:checked + .cf7as-checkbox-mark::after,
.cf7as-checkbox-mark.checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Additional high-specificity fallback styles for modal context */
.cf7as-submission-modal .cf7as-checkbox-mark.checked {
    background-color: #1d2327 !important;
}

.cf7as-submission-modal .cf7as-checkbox-mark.checked::after {
    content: '' !important;
    position: absolute !important;
    left: 4px !important;
    top: 1px !important;
    width: 4px !important;
    height: 8px !important;
    border: solid white !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
}

.cf7as-medium-name {
    font-weight: 500;
    line-height: 1.3;
}

.cf7as-mediums-error {
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    font-size: 13px;
}

/* Validation states */
.cf7as-mediums-wrapper.wpcf7-not-valid .cf7as-medium-checkbox {
    border-color: #dc3232;
    background-color: rgba(220, 50, 50, 0.05);
}

.wpcf7-not-valid-tip {
    display: block;
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* Modal context mediums styling */
.cf7as-submission-modal .cf7as-mediums-wrapper {
    margin: 15px 0;
}

.cf7as-submission-modal .cf7as-mediums-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.cf7as-submission-modal .cf7as-medium-checkbox {
    display: flex;
    align-items: center; /* Keep center alignment for vertical centering */
    padding: 8px 12px;
    background: var(--medium-bg, #f0f0f1);
    color: var(--medium-text, #1d2327);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-size: 13px;
    min-width: 0; /* Allow flex item to shrink */
    min-height: 36px; /* Minimum height for wrapped text with better spacing */
}

.cf7as-submission-modal .cf7as-medium-checkbox .cf7as-medium-name {
    flex: 1;
    min-width: 0; /* Allow text to shrink */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal; /* Allow text to wrap */
    line-height: 1.3;
    display: flex;
    align-items: center; /* Center text vertically within its container */
    min-height: 20px; /* Ensure minimum height for single line */
}

.cf7as-submission-modal .cf7as-medium-checkbox:hover {
    background: var(--medium-hover-bg, #e8e8e9);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cf7as-submission-modal .cf7as-medium-checkbox input[type="checkbox"] {
    flex-shrink: 0; /* Prevent checkbox from shrinking */
    margin-right: 8px;
    margin-left: 0;
    align-self: center; /* Ensure checkbox stays centered regardless of text height */
}

.cf7as-submission-modal .cf7as-medium-checkbox .cf7as-checkbox-mark {
    flex-shrink: 0; /* Prevent checkmark from shrinking */
    align-self: center; /* Center the checkmark */
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cf7as-mediums-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .cf7as-medium-checkbox {
        padding: 10px 12px;
    }
    
    .cf7as-submission-modal .cf7as-mediums-checkboxes {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}
