/**
 * Figlarne Kadry - Rezerwacje
 * Frontend Styles (Mobile-First)
 * Prefix: fkr-
 */

/* ==================== CSS Variables ==================== */
:root {
    --fkr-primary-color: #0073aa;
    --fkr-primary-hover: #005a87;
    --fkr-bg-color: #FFFFFF;
    --fkr-text-color: #333333;
    --fkr-border-color: #ddd;
    --fkr-border-radius: 8px;
    --fkr-max-width: 600px;
    --fkr-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fkr-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --fkr-shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);
    --fkr-transition: all 0.2s ease;
}

/* ==================== Wrapper & Container ==================== */
.fkr-wrapper {
    font-family: var(--fkr-font-family);
    color: var(--fkr-text-color);
    line-height: 1.6;
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
}

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

.fkr-booking-form-container {
    max-width: var(--fkr-max-width);
    margin: 0 auto;
    background-color: var(--fkr-bg-color);
    border-radius: var(--fkr-border-radius);
    box-shadow: var(--fkr-shadow);
    padding: 24px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* ==================== Progress Indicator ==================== */
.fkr-progress-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.fkr-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    opacity: 0.4;
    transition: var(--fkr-transition);
    z-index: 1;
}

.fkr-progress-step.fkr-active {
    opacity: 1;
}

.fkr-progress-step::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}



.fkr-progress-step.fkr-active::before {
    background: var(--fkr-primary-color);
}

.fkr-step-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-weight: 600;
    margin-bottom: 8px;
    transition: var(--fkr-transition);
    position: relative;
    z-index: 2;
}

.fkr-progress-step.fkr-active .fkr-step-number {
    background: var(--fkr-primary-color);
    color: #fff;
}

.fkr-step-label {
    display: block;
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.fkr-progress-step.fkr-active .fkr-step-label {
    color: var(--fkr-primary-color);
    font-weight: 600;
}

/* Mobile: ukryj etykiety i zmniejsz odstępy */
@media (max-width: 600px) {
    .fkr-step-label {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .fkr-step-label {
        display: none;
    }

    .fkr-step-number {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 14px;
    }

    .fkr-progress-step::before {
        top: 13px;
    }
}

/* ==================== Form Steps ==================== */
.fkr-form-step {
    display: none;
    animation: fkrFadeIn 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.fkr-form-step.fkr-active {
    display: block;
}

.fkr-form-step * {
    box-sizing: border-box;
}

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

.fkr-step-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: var(--fkr-primary-color);
}

/* ==================== Form Elements ==================== */
.fkr-form-group {
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.fkr-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--fkr-text-color);
}

.fkr-input,
.fkr-select,
.fkr-textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--fkr-transition);
    box-sizing: border-box;
    display: block;
}

.fkr-input:focus,
.fkr-select:focus,
.fkr-textarea:focus {
    outline: none;
    border-color: var(--fkr-primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.fkr-textarea {
    resize: vertical;
    min-height: 80px;
}

.fkr-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ==================== Datepicker ==================== */
.fkr-datepicker-wrapper {
    margin: 24px 0;
    width: 100%;
    box-sizing: border-box;
}

.fkr-datepicker {
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ==================== Buttons ==================== */
.fkr-btn {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--fkr-transition);
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%;
}

.fkr-btn-primary {
    background: var(--fkr-primary-color);
    color: #fff;
}

.fkr-btn-primary:hover:not(:disabled) {
    background: #ff5189;
    transform: translateY(-2px);
    box-shadow: var(--fkr-shadow-lg);
}

.fkr-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fkr-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.fkr-btn-secondary:hover {
    background: #d0d0d0;
}

.fkr-btn-back {
    background: transparent;
    border: none;
    color: var(--fkr-primary-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px;
    margin-bottom: 16px;
    transition: var(--fkr-transition);
}

.fkr-btn-back:hover {
    color: #ff5189;
}

.fkr-button-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    width: 100%;
    box-sizing: border-box;
}

.fkr-button-group .fkr-btn {
    flex: 1;
    min-width: 0;
}

/* Mobile: full width buttons */
@media (max-width: 480px) {
    .fkr-button-group {
        flex-direction: column;
    }
}

/* ==================== Checkbox ==================== */
.fkr-checkbox-group {
    margin-top: 24px;
}

.fkr-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.fkr-checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.fkr-checkbox-label span {
    font-size: 14px;
    line-height: 1.5;
}

/* ==================== Session Info ==================== */
.fkr-session-info {
    background: #f9f9f9;
    border-left: 4px solid var(--fkr-primary-color);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

.fkr-session-info h4 {
    margin: 0 0 8px 0;
    color: var(--fkr-primary-color);
    word-wrap: break-word;
}

.fkr-session-info p {
    margin: 8px 0;
    font-size: 14px;
    word-wrap: break-word;
}

.fkr-session-meta {
    display: flex;
    gap: 16px;
    font-weight: 600;
    color: var(--fkr-primary-color);
    flex-wrap: wrap;
}

/* ==================== Selected Date Display ==================== */
.fkr-selected-date-display {
    background: #f9f9f9;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--fkr-primary-color);
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
}

/* ==================== Selected Package Info ==================== */
.fkr-selected-package-info {
    margin-bottom: 24px;
}

/* ==================== Booking Summary ==================== */
.fkr-booking-summary,
.fkr-final-summary {
    background: #f0f8ff;
    border: 2px solid var(--fkr-primary-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

.fkr-booking-summary h4,
.fkr-final-summary h4 {
    margin: 0 0 16px 0;
    color: var(--fkr-primary-color);
}

.fkr-booking-summary ul,
.fkr-final-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fkr-booking-summary li,
.fkr-final-summary li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 107, 157, 0.1);
    list-style: none;
}

.fkr-booking-summary li:last-child,
.fkr-final-summary li:last-child {
    border-bottom: none;
}

.fkr-booking-summary strong,
.fkr-final-summary strong {
    color: #333;
    margin-right: 8px;
}

/* ==================== Success Step ==================== */
.fkr-success-icon {
    width: 80px;
    height: 80px;
    line-height: 80px;
    font-size: 48px;
    background: var(--fkr-primary-color);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    margin: 0 auto 24px;
    animation: fkrScale 0.5s ease;
}

@keyframes fkrScale {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.fkr-confirmation-message {
    text-align: center;
    margin-bottom: 24px;
}

.fkr-confirmation-message p {
    margin: 8px 0;
    font-size: 16px;
}

/* ==================== Loading Overlay ==================== */
.fkr-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--fkr-border-radius);
    z-index: 1000;
}

.fkr-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--fkr-primary-color);
    border-radius: 50%;
    animation: fkrSpin 1s linear infinite;
}

@keyframes fkrSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fkr-loading-text {
    margin-top: 16px;
    font-weight: 600;
    color: var(--fkr-primary-color);
}

/* ==================== Toastify Customization ==================== */
.toastify.on {
    font-family: var(--fkr-font-family);
    border-radius: 8px;
}

.toastify.fkr-toast-success {
    background: linear-gradient(135deg, #6dd5ed, #2193b0);
}

.toastify.fkr-toast-error {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* ==================== Responsive Adjustments ==================== */
@media (min-width: 768px) {
    .fkr-wrapper {
        padding: 32px;
    }

    .fkr-booking-form-container {
        padding: 40px;
    }

    .fkr-step-title {
        font-size: 28px;
    }
}

/* ==================== Accessibility ==================== */
.fkr-input:focus-visible,
.fkr-select:focus-visible,
.fkr-textarea:focus-visible,
.fkr-btn:focus-visible {
    outline: 2px solid var(--fkr-primary-color);
    outline-offset: 2px;
}

/* ==================== Form Element ==================== */
#fkr-booking-form {
    width: 100%;
    box-sizing: border-box;
}

/* ==================== Packages ==================== */
.fkr-packages-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.fkr-package-card {
    border: 2px solid var(--fkr-border-color);
    border-radius: var(--fkr-border-radius);
    padding: 14px;
    cursor: pointer;
    transition: var(--fkr-transition);
    background: #fff;
    position: relative;
}

.fkr-package-card:hover {
    border-color: var(--fkr-primary-color);
    box-shadow: var(--fkr-shadow);
}

.fkr-package-card.fkr-selected {
    border-color: var(--fkr-primary-color);
    background: #f0f8ff;
    box-shadow: var(--fkr-shadow-lg);
}

.fkr-package-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fkr-package-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    gap: 12px;
}

.fkr-package-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--fkr-text-color);
    margin: 0;
    flex: 1;
    min-width: 0;
}

.fkr-package-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--fkr-primary-color);
    white-space: nowrap;
    flex-shrink: 0;
}

.fkr-package-duration {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    text-align: left;
}

.fkr-package-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.fkr-package-features {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.fkr-package-features li {
    padding: 4px 0 4px 20px;
    position: relative;
    font-size: 13px;
    color: #333;
    text-align: left;
    list-style: none;
    line-height: 1.4;
}

.fkr-package-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--fkr-primary-color);
    font-weight: 700;
    font-size: 14px;
}

.fkr-package-default-badge {
    display: inline-block;
    background: var(--fkr-primary-color);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    margin-left: 6px;
}

/* Tablet i desktop - 2 kolumny */
@media (min-width: 600px) {
    .fkr-packages-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .fkr-package-card {
        padding: 16px;
    }

    .fkr-package-name {
        font-size: 17px;
    }

    .fkr-package-price {
        font-size: 19px;
    }
}

/* Duże ekrany - 3 kolumny */
@media (min-width: 900px) {
    .fkr-packages-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .fkr-booking-form-container {
        box-shadow: none;
    }

    .fkr-btn,
    .fkr-loading-overlay {
        display: none !important;
    }
}
