/* TerraCloud Wizard - CSS Styles */
/* Color scheme based on atisoft.pl */
:root {
    --primary-color: #CA005D;
    --primary-dark: #a30049;
    --secondary-color: #00b894;
    --accent-color: #CA005D;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --border-color: #dfe6e9;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --success-color: #00b894;
    --error-color: #d63031;
    --warning-color: #fdcb6e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.wizard-container {
    max-width: 1000px !important;  /* było 100% */
    width: 95% !important;
    margin: 0 auto !important;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Progress Bar - CRITICAL FIXES */
.wizard-container .progress-bar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    background: var(--bg-light) !important;
    padding: 30px 40px !important;
    position: relative !important;
}

.wizard-container .progress-bar::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 10% !important;
    right: 10% !important;
    height: 3px !important;
    background: var(--border-color) !important;
    transform: translateY(-50%) !important;
    z-index: 0 !important;
}

.wizard-container .progress-step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative !important;
    z-index: 1 !important;
    flex: 1 !important;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.step-label {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
    font-weight: 500;
}

.progress-step.active .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .step-number {
	background: #f8f9fa;
	border-color: #dfe6e9;
	color: #2d3436;
}

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

/* Form Steps */
.wizard-form {
    padding: 40px;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

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

.form-step h2 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 28px;
}

.step-description {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 16px;
}

/* Form Groups */
.form-group {
    margin-bottom: 30px;
}

.question-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 16px;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    margin-right: 10px;
}

.required {
    color: var(--error-color);
    margin-left: 4px;
}

/* Radio Options */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
    transform: translateX(5px);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.radio-option input[type="radio"]:checked ~ .radio-label {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-label {
    flex: 1;
    font-size: 15px;
}

/* Checkbox Options */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.checkbox-option:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.checkbox-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-right: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.checkbox-option input[type="checkbox"]:checked ~ .checkbox-label {
    color: var(--primary-color);
    font-weight: 600;
}

.checkbox-label {
    flex: 1;
    font-size: 15px;
}

/* Device Details */
.device-details {
    margin-left: 60px;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Text Inputs */
.text-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-unit .text-input {
    max-width: 150px;
}

.unit {
    font-weight: 600;
    color: var(--text-dark);
}

.price-info {
    color: var(--text-light);
    font-size: 14px;
}

/* Field Hints */
.field-hint {
    margin-top: 8px;
    color: var(--text-light);
    font-size: 13px;
    font-style: italic;
}

/* Error States */
.input-error {
    border-color: var(--error-color) !important;
    background-color: #fff5f5;
}

.error-message {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-message::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
}

.checkbox-option.input-error {
    border-color: var(--error-color);
    background-color: #fff5f5;
}

/* Error message in consent section needs special margin */
.consent-section .error-message {
    margin-left: 39px;
}

/* Service Cards */
.service-cards {
    display: grid;
    gap: 15px;
}

.service-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    background: var(--bg-white);
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.service-header .checkbox-option {
    border: none;
    padding: 0;
    margin: 0;
}

.info-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.info-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.service-price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 16px;
    margin-top: 10px;
}

.service-info {
    margin-top: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Summary Container */
.summary-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.recommended-package {
    background: linear-gradient(135deg, var(--primary-color), #e91e73);
    color: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.recommended-package::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.package-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.package-name {
    font-size: 40px !important;
    margin-bottom: 20px;
    font-weight: 900;
    color: #FFFFFF !important;
}

.package-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.spec-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.spec-item i {
    margin-right: 8px;
}

.package-price {
    font-size: 18px;
}

.price-amount {
    font-size: 48px;
    font-weight: 700;
}

.price-period {
    font-size: 16px;
    opacity: 0.9;
}

.package-note {
    margin-top: 15px;
    font-size: 13px;
    opacity: 0.85;
    font-style: italic;
}

/* Selected Options */
.selected-options,
.additional-services {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 12px;
}

.selected-options h4,
.additional-services h4 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 18px;
}

#summary-choices,
#summary-services {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: white;
    border-radius: 12px;
    font-size: 14px;
}

.summary-item-label {
    color: var(--text-dark);
}

.summary-item-value {
    color: var(--primary-color);
    font-weight: 600;
}

/* Price Breakdown */
.price-breakdown {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border-color);
}

.price-row:last-child {
    border-bottom: none;
}

.price-row.total-row {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 2px solid var(--primary-color);
    font-size: 20px;
    color: var(--primary-color);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Section Divider */
.section-divider {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 30px 0;
}

.section-title {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 20px;
}

/* Consent Section */
.consent-section {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
}

.consent-intro {
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.consent-item {
    margin-bottom: 15px;
    border: none !important;
    padding: 10px 0 !important;
}

.consent-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.consent-item a:hover {
    text-decoration: underline;
}

/* Button "Zaznacz wszystkie zgody" */
.btn-select-all-consents {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(202, 0, 93, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-select-all-consents:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(202, 0, 93, 0.4);
    background: var(--primary-dark);
}

.btn-select-all-consents:active {
    transform: translateY(-1px);
}

.btn-select-all-consents i {
    font-size: 16px;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
}

/* Buttons */
.btn {
    padding: 16px 36px !important;
    border: none;
    border-radius: 14px !important;
    font-size: 16px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(202, 0, 93, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(202, 0, 93, 0.4);
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-success {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(202, 0, 93, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(202, 0, 93, 0.4);
    background: var(--primary-dark);
}

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

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.loading-spinner i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 18px;
    color: var(--text-dark);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    animation: slideUp 0.5s ease;
}

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

.success-icon {
    font-size: 72px;
    color: var(--success-color);
    margin-bottom: 20px;
}

.modal-content h2 {
    color: var(--text-dark);
    margin-bottom: 20px;
}

.modal-content p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-content strong {
    color: var(--primary-color);
}

.modal-content .btn {
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wizard-container {
        border-radius: 16px;
    }

    .progress-bar {
        padding: 20px 15px;
    }

    .step-label {
        font-size: 11px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .wizard-form {
        padding: 25px 20px;
    }

    .form-step h2 {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .package-specs {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .progress-bar,
    .form-actions,
    .info-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
}
