/**
 * Frontend CSS per Yacht Claims Manager
 * File: assets/css/frontend.css
 * Version: 3.0 - Design ultra-moderno con font contemporanee
 */

/* =================================================
   Import Font Moderne
   ================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* =================================================
   Variabili CSS Custom Properties
   ================================================= */
:root {
    /* Colori primari aggiornati */
    --ycm-primary: #2563eb;
    --ycm-primary-dark: #1d4ed8;
    --ycm-primary-light: #3b82f6;
    --ycm-primary-rgb: 37, 99, 235;
    
    /* Colori secondari */
    --ycm-secondary: #0f172a;
    --ycm-secondary-light: #1e293b;
    
    /* Stati */
    --ycm-success: #10b981;
    --ycm-success-dark: #059669;
    --ycm-success-light: #34d399;
    --ycm-success-rgb: 16, 185, 129;
    --ycm-danger: #ef4444;
    --ycm-danger-dark: #dc2626;
    --ycm-danger-rgb: 239, 68, 68;
    --ycm-warning: #f59e0b;
    --ycm-info: #3b82f6;
    
    /* Scala di grigi moderna */
    --ycm-gray-50: #fafafa;
    --ycm-gray-100: #f4f4f5;
    --ycm-gray-200: #e4e4e7;
    --ycm-gray-300: #d4d4d8;
    --ycm-gray-400: #a1a1aa;
    --ycm-gray-500: #71717a;
    --ycm-gray-600: #52525b;
    --ycm-gray-700: #3f3f46;
    --ycm-gray-800: #27272a;
    --ycm-gray-900: #18181b;
    
    /* Ombre moderne */
    --ycm-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ycm-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --ycm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --ycm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --ycm-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --ycm-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --ycm-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    
    /* Border radius */
    --ycm-radius-sm: 6px;
    --ycm-radius: 8px;
    --ycm-radius-md: 10px;
    --ycm-radius-lg: 12px;
    --ycm-radius-xl: 16px;
    --ycm-radius-2xl: 24px;
    --ycm-radius-full: 9999px;
    
    /* Transizioni */
    --ycm-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --ycm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ycm-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --ycm-spacing-xs: 4px;
    --ycm-spacing-sm: 8px;
    --ycm-spacing-md: 16px;
    --ycm-spacing-lg: 24px;
    --ycm-spacing-xl: 32px;
    --ycm-spacing-2xl: 48px;
    --ycm-spacing-3xl: 64px;
    
    /* Font families */
    --ycm-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --ycm-font-display: 'Plus Jakarta Sans', var(--ycm-font-sans);
}

/* =================================================
   Reset e Base
   ================================================= */
* {
    box-sizing: border-box;
}

/* =================================================
   Container principale
   ================================================= */
.ycm-form-container {
    max-width: 1024px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: var(--ycm-font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ycm-gray-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    width: 100%;
}

/* =================================================
   Header del form
   ================================================= */
.ycm-form-header {
    text-align: center;
    margin-bottom: var(--ycm-spacing-3xl);
    position: relative;
    animation: fadeInDown 0.6s ease;
}

.ycm-form-header::before {
  content: '';
  position: absolute;
  width: 80px;
  height: 5px;
  background: linear-gradient(90deg, #fff, var(--ycm-primary-light));
  left: 50%;
  transform: translateX(-50%);
  bottom: -24px;
  border-radius: var(--ycm-radius-full);
  box-shadow: 0 2px 8px rgba(var(--ycm-primary-rgb), 0.3);
}

.ycm-form-header h2 {
  font-family: var(--ycm-font-display);
  color: var(--ycm-gray-900);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.1;
  background: linear-gradient(135deg, #99aab0, var(--ycm-gray-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ycm-form-subtitle {
  color: #757575;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}

/* =================================================
   Form principale
   ================================================= */
.ycm-form {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--ycm-spacing-2xl);
    border-radius: var(--ycm-radius-xl);
    box-shadow: var(--ycm-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

.ycm-form::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--ycm-primary-rgb), 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* =================================================
   Gruppi di form
   ================================================= */
.ycm-form-group {
    margin-bottom: var(--ycm-spacing-xl);
    position: relative;
    animation: fadeIn 0.5s ease backwards;
}

.ycm-form-group:nth-child(1) { animation-delay: 0.1s; }
.ycm-form-group:nth-child(2) { animation-delay: 0.15s; }
.ycm-form-group:nth-child(3) { animation-delay: 0.2s; }
.ycm-form-group:nth-child(4) { animation-delay: 0.25s; }
.ycm-form-group:nth-child(5) { animation-delay: 0.3s; }

.ycm-form-row {
    display: flex;
    gap: var(--ycm-spacing-lg);
}

.ycm-col-6 {
    flex: 1;
}

/* =================================================
   Labels
   ================================================= */
.ycm-form-group label {
  display: block;
  margin-bottom: var(--ycm-spacing-sm);
  color: #596a68;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.01em;
  font-family: var(--ycm-font-sans);
}

.ycm-form-group label span {
  color: #393333;
  font-weight: 600;
  font-size: 12px;
}

/* =================================================
   Input e textarea
   ================================================= */
.ycm-form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--ycm-gray-200);
    border-radius: var(--ycm-radius-md);
    font-size: 16px;
    font-family: var(--ycm-font-sans);
    font-weight: 400;
    color: var(--ycm-gray-900);
    background-color: rgba(255, 255, 255, 0.8);
    transition: var(--ycm-transition);
    outline: none;
}

.ycm-form-control::placeholder {
    color: var(--ycm-gray-400);
    font-weight: 400;
}

.ycm-form-control:hover {
    border-color: var(--ycm-gray-300);
    background-color: rgba(255, 255, 255, 0.95);
}



textarea.ycm-form-control {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.6;
}

/* =================================================
   Help text
   ================================================= */
.ycm-help-text {
    display: block;
    margin-top: var(--ycm-spacing-xs);
    color: var(--ycm-gray-500);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* =================================================
   Radio group moderno
   ================================================= */
.ycm-radio-group {

    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--ycm-spacing-md);
}






.ycm-radio-label {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid var(--ycm-gray-200);
    border-radius: var(--ycm-radius-md);
    cursor: pointer;

    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}



.ycm-radio-label:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--ycm-gray-300);
    transform: translateY(-2px);
    box-shadow: var(--ycm-shadow-md);
}





.ycm-radio-label:hover::before {
    width: 100%;
}

.ycm-radio-label.selected, .ycm-radio-label:has(input:checked) {
  background: #fff !important;
  border-color: #4f7aa8;
  color: #ffffff;
  transform: translateY(-2px);
}

.ycm-radio-label input[type="radio"] {
  margin-right: 6px;
  width: 20px;
  height: 20px;
  accent-color: #4f7aa8;
  cursor: pointer;
  vertical-align: bottom;
}

.ycm-radio-label.selecte {
  background: #fff !important;
  color: white !important;
}

.ycm-radio-label span {
    position: relative;
    z-index: 1;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: -0.01em;
}

/* =================================================
   File upload moderno
   ================================================= */
.ycm-file-upload {
    position: relative;
}

.ycm-file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ycm-file-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
  background: linear-gradient(135deg, #fff, var(--ycm-primary-light));
    color: white;
    border-radius: var(--ycm-radius-md);
    cursor: pointer;
    transition: var(--ycm-transition);
    font-weight: 600;
    font-size: 15px;
    font-family: var(--ycm-font-sans);
    letter-spacing: -0.01em;
    box-shadow: var(--ycm-shadow-md);
    position: relative;
    overflow: hidden;
}

.ycm-file-label::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ycm-file-label:hover {
    transform: translateY(-2px);
   
}

.ycm-file-label:hover::before {
    width: 400px;
    height: 400px;
}

.ycm-file-label:active {
    transform: translateY(0);
}

.ycm-file-icon {
    font-size: 20px;
}

.ycm-file-info {
    margin-top: var(--ycm-spacing-sm);
    color: var(--ycm-gray-500);
    font-size: 14px;
    line-height: 1.6;
}

/* File preview moderno */
.ycm-file-preview {
    margin-top: var(--ycm-spacing-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--ycm-spacing-sm);
}

.ycm-file-preview-item {
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--ycm-gray-200);
    border-radius: var(--ycm-radius);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--ycm-transition);
    animation: slideIn 0.3s ease;
}

.ycm-file-preview-item:hover {
    background: #ffffff;
    border-color: var(--ycm-gray-300);
    box-shadow: var(--ycm-shadow-sm);
    transform: translateY(-1px);
}

.ycm-file-preview-item .remove {
    cursor: pointer;
    color: var(--ycm-danger);
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--ycm-radius-sm);
    transition: var(--ycm-transition);
    font-size: 13px;
}

.ycm-file-preview-item .remove:hover {
    background: rgba(var(--ycm-danger-rgb), 0.1);
    transform: scale(1.05);
}

/* =================================================
   Submit button moderno
   ================================================= */
.ycm-form-actions {
    margin-top: var(--ycm-spacing-2xl);
    text-align: center;
}

.ycm-btn {
    padding: 16px 40px;
    border: none;
    border-radius: var(--ycm-radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--ycm-font-sans);
    cursor: pointer;
    transition: var(--ycm-transition);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
    position: relative;
    overflow: hidden;
    text-transform: none;
}

.ycm-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.ycm-btn:active::before {
    width: 400px;
    height: 400px;
}

.ycm-btn-primary {
  background: linear-gradient(135deg, #649cf8, #1e1e1e);
  color: white;
  box-shadow: var(--ycm-shadow-md);
}
.ycm-btn-primary:hover {
     background: white;
  color: #313131;
  box-shadow: var(--ycm-shadow-md);
}

.ycm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Loading spinner moderno */
.ycm-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: ycm-spin 0.8s linear infinite;
}

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

/* =================================================
   Messages moderni
   ================================================= */
#form-messages,
.ycm-form-messages {
    margin-top: var(--ycm-spacing-lg);
}

.ycm-alert {
    padding: 18px 24px;
    border-radius: var(--ycm-radius-md);
    margin-bottom: var(--ycm-spacing-md);
    animation: slideIn 0.4s ease;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ycm-alert::before {
    content: '';
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 14px;
}

.ycm-alert-success {
    background: rgba(var(--ycm-success-rgb), 0.1);
    color: var(--ycm-success-dark);
    border: 2px solid rgba(var(--ycm-success-rgb), 0.2);
}

.ycm-alert-success::before {
    content: '✓';
    background: var(--ycm-success);
    color: white;
}

.ycm-alert-error {
    background: rgba(var(--ycm-danger-rgb), 0.1);
    color: var(--ycm-danger-dark);
    border: 2px solid rgba(var(--ycm-danger-rgb), 0.2);
}

.ycm-alert-error::before {
    content: '!';
    background: var(--ycm-danger);
    color: white;
}

/* Error states */
.ycm-field-error {
  border-color: #444343 !important;
  background-color: rgba(81, 68, 239, 0.05) !important;
}

.ycm-error-text {
    color: var(--ycm-danger);
    font-size: 13px;
    margin-top: var(--ycm-spacing-xs);
    display: block;
    font-weight: 500;
}

/* =================================================
   Animazioni fluide
   ================================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* =================================================
   Responsive design moderno
   ================================================= */
@media (max-width: 768px) {
    .ycm-form-container {
        margin: 40px auto;
        padding: 0 16px;
    }
    
    .ycm-form {
        padding: var(--ycm-spacing-xl) var(--ycm-spacing-lg);
    }
    
    .ycm-form-header h2 {
        font-size: 32px;
    }
    
    .ycm-form-header {
        margin-bottom: var(--ycm-spacing-2xl);
    }
    
    .ycm-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ycm-radio-group {
        grid-template-columns: 1fr;
        gap: var(--ycm-spacing-sm);
    }
    
    .ycm-btn {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }
    
    .ycm-form-control {
        font-size: 16px; /* Previene zoom su iOS */
    }
}

@media (max-width: 480px) {
    .ycm-form {
        padding: var(--ycm-spacing-lg) var(--ycm-spacing-md);
    }
    
    .ycm-file-label {
        width: 100%;
        justify-content: center;
    }
}

/* =================================================
   Dark mode support
   ================================================= */
@media (prefers-color-scheme: dark) {
    :root {
        --ycm-gray-50: #18181b;
        --ycm-gray-100: #27272a;
        --ycm-gray-200: #3f3f46;
        --ycm-gray-300: #52525b;
        --ycm-gray-400: #71717a;
        --ycm-gray-500: #a1a1aa;
        --ycm-gray-600: #d4d4d8;
        --ycm-gray-700: #e4e4e7;
        --ycm-gray-800: #f4f4f5;
        --ycm-gray-900: #fafafa;
    }
    
    .ycm-form {
        background: rgba(24, 24, 27, 0.9);
        border-color: rgba(63, 63, 70, 0.5);
    }
    
    .ycm-form-control {
        background-color: rgba(39, 39, 42, 0.5);
        color: var(--ycm-gray-100);
    }
    
    .ycm-form-control:focus {
        background-color: rgba(39, 39, 42, 0.8);
    }
}

/* =================================================
   Focus visible per accessibilità
   ================================================= */


/* =================================================
   Print styles
   ================================================= */
@media print {
    .ycm-form-container {
        margin: 0;
        max-width: 100%;
    }
    
    .ycm-form {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .ycm-btn,
    .ycm-file-label {
        display: none;
    }
}

/* =================================================
   Smooth scrolling
   ================================================= */
html {
    scroll-behavior: smooth;
}

/* =================================================
   Performance optimizations
   ================================================= */


/* Supporto per motion reduced */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =================================================
   Utility classes
   ================================================= */
.ycm-mt-1 { margin-top: var(--ycm-spacing-xs); }
.ycm-mt-2 { margin-top: var(--ycm-spacing-sm); }
.ycm-mt-3 { margin-top: var(--ycm-spacing-md); }
.ycm-mt-4 { margin-top: var(--ycm-spacing-lg); }
.ycm-mt-5 { margin-top: var(--ycm-spacing-xl); }

.ycm-text-center { text-align: center; }
.ycm-text-left { text-align: left; }
.ycm-text-right { text-align: right; }

.ycm-hidden { display: none !important; }
.ycm-invisible { visibility: hidden; }

/* =================================================
   WordPress compatibility
   ================================================= */
.is-layout-constrained > .alignwide {
    max-width: var(--wp--style--global--wide-size);
    display: none;
}










