/* ============================================================
   Wedding Upload — form styles
   ============================================================ */

/* Wrapper */
.wedding-upload-wrap {
    max-width: 600px;
    margin: 0 auto;
    font-family: inherit;
}

/* Honeypot */
.wedding-hp {
    position: absolute;
    left: -9999px;
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

/* Fields */
.wedding-field {
    margin-bottom: 18px;
}

.wedding-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.wedding-field input[type="text"],
.wedding-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: #222;
}

.wedding-field input[type="text"]:focus,
.wedding-field textarea:focus {
    outline: none;
    border-color: #b8a9a0;
    box-shadow: 0 0 0 3px rgba(184, 169, 160, 0.18);
}

/* Message header con toggle visibilità */
.wedding-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.wedding-message-header label {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.wedding-visibility-toggle {
    display: flex;
    border: 1px solid #d4d4d4;
    border-radius: 20px;
    overflow: hidden;
    background: #f5f5f5;
}

.wedding-vis-btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 5px 14px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    color: #aaa !important;
    white-space: nowrap;
    transition: background 0.18s, color 0.18s;
    line-height: 1.4;
    border-radius: 20px !important;
}

.wedding-vis-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.wedding-vis-btn:hover:not(.wedding-vis-active) {
    background: #ebe6e3 !important;
    color: #666 !important;
}

/* Pubblico attivo → verde */
.wedding-vis-btn.wedding-vis-public.wedding-vis-active {
    background: #4caf50 !important;
    color: #fff !important;
}

/* Privato attivo → ambra scura */
.wedding-vis-btn.wedding-vis-private.wedding-vis-active {
    background: #e07b39 !important;
    color: #fff !important;
}

/* Hint sotto la textarea */
.wedding-vis-hint {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.4;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.wedding-vis-hint-public,
.wedding-vis-hint:not([class*="wedding-vis-hint-"]) {
    background: #f0f7f0;
    color: #2e7d32;
}

.wedding-vis-hint-private {
    background: #fff4ee;
    color: #c25a1a;
}

/* Dropzone */
.wedding-dropzone {
    position: relative;
    border: 2px dashed #d4d4d4;
    border-radius: 12px;
    padding: 36px 20px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 16px;
}

.wedding-dropzone.wedding-dragover {
    border-color: #b8a9a0;
    background: #f5f0ee;
}

.wedding-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.wedding-dropzone-label {
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.wedding-icon {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 4px;
}

.wedding-browse {
    color: #b8a9a0;
    text-decoration: underline;
    cursor: pointer;
    pointer-events: all;
    font-weight: 600;
}

.wedding-dropzone-label small {
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

/* File list */
.wedding-file-list {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wedding-file-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 14px;
}

.wedding-file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.wedding-file-size {
    color: #aaa;
    white-space: nowrap;
    font-size: 12px;
    flex-shrink: 0;
}

.wedding-file-remove {
    background: none;
    border: none;
    color: #c00;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.wedding-file-remove:hover {
    opacity: 1;
}

/* Progress bar */
.wedding-progress {
    flex-basis: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.wedding-progress-bar {
    height: 100%;
    width: 0;
    background: #b8a9a0;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.wedding-progress-bar.wedding-progress-ok {
    background: #4caf50;
}

/* Per-file result label */
.wedding-file-result {
    flex-basis: 100%;
    font-size: 12px;
    line-height: 1;
}

.wedding-ok  { color: #2e7d32; }
.wedding-err { color: #c62828; }

/* Submit button */
.wedding-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #b8a9a0;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.02em;
    transition: background 0.2s, opacity 0.2s;
}

.wedding-btn:hover:not(:disabled) {
    background: #a0928a;
}

.wedding-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Modal loader */
.wedding-loader-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.wedding-loader-overlay.wedding-loader-visible {
    display: flex;
    animation: wedding-fadein 0.2s ease;
}

@keyframes wedding-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.wedding-loader-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px;
    text-align: center;
    width: 320px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.wedding-loader-icon {
    font-size: 40px;
    animation: wedding-pulse 1.2s ease-in-out infinite;
    margin-bottom: 12px;
    line-height: 1;
}

.wedding-loader-icon--ok {
    animation: wedding-popin 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    color: #4caf50;
    font-style: normal;
    font-size: 52px;
}

@keyframes wedding-popin {
    0%   { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

@keyframes wedding-pulse {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%       { transform: scale(1.15); opacity: 0.7; }
}

.wedding-loader-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px;
}

.wedding-loader-file {
    font-size: 12px;
    color: #999;
    margin: 0 0 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.wedding-loader-bar-wrap {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.wedding-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #b8a9a0, #8fa89e);
    border-radius: 3px;
    transition: width 0.15s linear;
}

.wedding-loader-count {
    font-size: 13px;
    color: #aaa;
    margin: 0;
}

/* Status banner */
.wedding-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s;
}

.wedding-status:empty {
    display: none;
}

.wedding-status-info    { background: #e3f2fd; color: #1565c0; }
.wedding-status-success { background: #e8f5e9; color: #2e7d32; }
.wedding-status-warning { background: #fff8e1; color: #e65100; }
.wedding-status-error   { background: #ffebee; color: #c62828; }
