/**
 * Pitchenas Customizer - Frontend Styles
 */

/* ===== General Wrapper ===== */
.pitchenas-customizer-wrap {
    margin: 20px 0 30px;
    padding: 0;
    font-family: inherit;
}

.pitchenas-section-title {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #8B4513;
    color: #333;
}

/* ===== Section ===== */
.pitchenas-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.pitchenas-option-title {
    font-size: 1.15em;
    font-weight: 600;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pitchenas-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #8B4513;
    color: #fff;
    border-radius: 50%;
    font-size: 0.85em;
    font-weight: 700;
    flex-shrink: 0;
}

.pitchenas-required {
    font-size: 0.75em;
    color: #c0392b;
    font-weight: 400;
    text-transform: uppercase;
}

.pitchenas-optional {
    font-size: 0.75em;
    color: #7f8c8d;
    font-weight: 400;
    text-transform: uppercase;
}

.pitchenas-description {
    color: #666;
    font-size: 0.9em;
    margin: 0 0 15px;
}

/* ===== Team Colors ===== */
.pitchenas-teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.pitchenas-team {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
}

.pitchenas-team-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #333;
}

.pitchenas-color-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pitchenas-color-option {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 44px;
}

.pitchenas-color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pitchenas-color-swatch {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.pitchenas-color-option:hover .pitchenas-color-swatch {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.pitchenas-color-option input:checked + .pitchenas-color-swatch {
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.3);
    transform: scale(1.1);
}

.pitchenas-color-option.pitchenas-color-disabled {
    opacity: 0.25;
    pointer-events: none;
    cursor: not-allowed;
}

.pitchenas-color-name {
    font-size: 0.65em;
    text-align: center;
    margin-top: 2px;
    color: #666;
    line-height: 1.2;
}

/* ===== Radio Cards (Rond Central main choice) ===== */
.pitchenas-rond-choice {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.pitchenas-radio-card {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.pitchenas-radio-card:hover {
    border-color: #8B4513;
    background: #fdf6ee;
}

.pitchenas-radio-card input[type="radio"] {
    margin: 3px 12px 0 0;
    flex-shrink: 0;
}

.pitchenas-radio-card input:checked ~ .pitchenas-radio-card-content {
    color: #333;
}

.pitchenas-radio-card--selected {
    border-color: #8B4513;
    background: #fdf6ee;
}

.pitchenas-radio-card-content strong {
    display: block;
    margin-bottom: 2px;
}

.pitchenas-radio-card-content small {
    color: #888;
    font-size: 0.85em;
}

/* ===== Sub options (catalogue / custom) ===== */
.pitchenas-rond-sub {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.pitchenas-catalogue-types {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.pitchenas-radio-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background 0.2s;
}

.pitchenas-radio-inline:hover {
    background: #f0e6d6;
}

.pitchenas-radio-inline--selected {
    background: #fdf6ee;
    border-color: #8B4513;
}

.pitchenas-price-badge {
    display: inline-block;
    background: #8B4513;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: auto;
}

/* ===== Gallery ===== */
.pitchenas-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.pitchenas-gallery-item {
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    background: #fff;
    text-align: center;
}

.pitchenas-gallery-item:hover {
    border-color: #ccc;
    transform: scale(1.03);
}

.pitchenas-gallery-item--selected {
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2);
}

.pitchenas-gallery-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pitchenas-gallery-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

/* Zoom button on gallery items */
.pitchenas-zoom-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 2;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.pitchenas-zoom-btn svg {
    display: block;
    width: 14px;
    height: 14px;
}

.pitchenas-gallery-item:hover .pitchenas-zoom-btn {
    opacity: 1;
}

.pitchenas-zoom-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.1);
}

/* ===== Lightbox ===== */
.pitchenas-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pitchenas-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.pitchenas-lightbox-content {
    position: relative;
    max-width: 600px;
    max-height: 80vh;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    text-align: center;
    z-index: 1;
    animation: pitchenasLightboxIn 0.2s ease-out;
}

@keyframes pitchenasLightboxIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.pitchenas-lightbox-content img {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 6px;
    object-fit: contain;
}

.pitchenas-lightbox-close,
.pitchenas-lightbox-close:focus,
.pitchenas-lightbox-close:active {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    background: #fff !important;
    color: #333 !important;
    border: 2px solid #ddd !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 32px !important;
    text-align: center !important;
    cursor: pointer !important;
    z-index: 2;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
    transition: color 0.2s, border-color 0.2s;
}

.pitchenas-lightbox-close:hover {
    color: #ED64A6 !important;
    border-color: #ED64A6 !important;
    background: #fff !important;
}

.pitchenas-lightbox-title {
    margin: 10px 0 0;
    font-size: 0.95em;
    color: #333;
    font-weight: 600;
}

.pitchenas-gallery-title {
    display: block;
    font-size: 0.7em;
    padding: 4px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pitchenas-no-images {
    color: #999;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* ===== Info & Warning boxes ===== */
.pitchenas-info-box {
    margin-top: 15px;
    padding: 12px 15px;
    background: #e8f4fd;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
    font-size: 0.9em;
    color: #333;
}

.pitchenas-warning-box {
    margin-top: 10px;
    padding: 12px 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 0.9em;
    color: #856404;
}

/* ===== Dedicace ===== */
.pitchenas-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95em;
    padding: 5px 0;
}

.pitchenas-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8B4513;
}

#pitchenas-dedicace-content {
    margin-top: 12px;
}

#pitchenas-dedicace-content textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95em;
    resize: vertical;
    min-height: 70px;
}

#pitchenas-dedicace-content textarea:focus {
    border-color: #8B4513;
    outline: none;
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.15);
}

.pitchenas-char-counter {
    text-align: right;
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
}

.pitchenas-char-counter.pitchenas-char-limit {
    color: #c0392b;
    font-weight: 600;
}

/* ===== Price Summary ===== */
.pitchenas-price-summary {
    margin-top: 20px;
    padding: 15px 20px;
    background: #fdf6ee;
    border: 2px solid #8B4513;
    border-radius: 8px;
}

.pitchenas-price-summary h4 {
    margin: 0 0 10px;
    font-size: 1em;
    color: #8B4513;
}

#pitchenas-price-lines {
    font-size: 0.9em;
    color: #555;
}

#pitchenas-price-lines .pitchenas-price-line {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px dotted #ddd;
}

.pitchenas-price-total {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 2px solid #8B4513;
    text-align: right;
    font-size: 1.1em;
    color: #8B4513;
}

/* ===== Upload Form ===== */
.pitchenas-upload-wrap {
    max-width: 600px;
    margin: 30px auto;
}

.pitchenas-upload-wrap h3 {
    color: #333;
    margin-bottom: 10px;
}

.pitchenas-form-field {
    margin-bottom: 18px;
}

.pitchenas-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.pitchenas-form-field label .required {
    color: #c0392b;
}

.pitchenas-form-field input[type="text"],
.pitchenas-form-field input[type="email"],
.pitchenas-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95em;
    font-family: inherit;
}

.pitchenas-form-field input:focus,
.pitchenas-form-field textarea:focus {
    border-color: #8B4513;
    outline: none;
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.15);
}

.pitchenas-field-help {
    display: block;
    margin-top: 5px;
    font-size: 0.82em;
    color: #888;
}

.pitchenas-submit-btn {
    background: #8B4513 !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 30px !important;
    font-size: 1em !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: background 0.2s;
}

.pitchenas-submit-btn:hover {
    background: #6d3610 !important;
}

.pitchenas-submit-btn:disabled {
    background: #aaa !important;
    cursor: not-allowed;
}

/* ===== Messages ===== */
.pitchenas-msg {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95em;
}

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

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

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .pitchenas-teams-grid {
        grid-template-columns: 1fr;
    }

    .pitchenas-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .pitchenas-section {
        padding: 15px;
    }

    .pitchenas-option-title {
        font-size: 1em;
    }

    .pitchenas-radio-card {
        padding: 10px;
    }
}
