/* ==========================================
   WPO TRIPS - REGISTRATION SYSTEM CSS
   ========================================== */

/* ====== FLOATING BUTTON ====== */
.wpo-trip-register-btn-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    animation: wpoFadeInUp 0.5s ease-in-out;
}

.wpo-trip-register-btn:hover span{
    color: #fff!important;
}

.wpo-trip-register-btn {
    background: linear-gradient(135deg, #2E8B57, #228B22) !important;
    color: white!important;
    border: none!important;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(46, 139, 87, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
}

.wpo-trip-register-btn:hover {
    background: linear-gradient(135deg, #228B22, #1E6B1E);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(46, 139, 87, 0.4);
}

.wpo-trip-register-btn .btn-icon {
    font-size: 20px;
}

.wpo-trip-register-btn .btn-text {
    flex: 1;
}

.wpo-trip-register-btn .places-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Responsywne dostosowanie przycisku */
@media (max-width: 768px) {
    .wpo-trip-register-btn-container {
        bottom: 15px;
        right: 15px;
    }
    
    .wpo-trip-register-btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 180px;
    }
    
    .wpo-trip-register-btn .btn-text {

    }
    
    .wpo-trip-register-btn::after {
        /*content: "Rezerwacja biletu";*/
        /*margin-left: 5px;*/
    }
}

/* ====== MODAL OVERLAY ====== */
.wpo-trip-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.wpo-trip-modal-container {
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: wpoModalSlideIn 0.3s ease-out;
}

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

/* ====== MODAL HEADER ====== */
.wpo-trip-modal-header {
    background: linear-gradient(135deg, #2E8B57, #228B22);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpo-trip-modal-header h3 {
    margin: 0;
    font-size: 24px;
    color: #fff!important;
    font-weight: 600;
}

.wpo-trip-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.wpo-trip-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ====== MODAL CONTENT ====== */
.wpo-trip-modal-content {
    padding: 0;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Custom scrollbar */
.wpo-trip-modal-content::-webkit-scrollbar {
    width: 6px;
}

.wpo-trip-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.wpo-trip-modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.wpo-trip-modal-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ====== TRIP INFO ====== */
.wpo-trip-info {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.wpo-trip-info h4 {
    margin: 0 0 10px 0;
    color: #2E8B57;
    font-size: 18px;
}

.wpo-trip-info p {
    margin: 0;
    color: #666;
}

/* ====== FORMULARZ ====== */
#wpo-trip-registration-form {
    padding: 30px;
}

.wpo-form-group {
    margin-bottom: 20px;
}

.wpo-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}
body .wpo-form-group textarea{
    resize: vertical;
    min-height: 100px!important;
}
.wpo-form-group input,
.wpo-form-group select,
.wpo-form-group textarea {
    width: 100%;
    padding: 5px;
    border: 2px solid #e9ecef!important;
    border-radius: 8px!important;
    height: 34px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.wpo-form-group input:focus,
.wpo-form-group select:focus,
.wpo-form-group textarea:focus {
    outline: none;
    border-color: #2E8B57;
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

.wpo-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .wpo-form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ====== OSOBY - REPEATER ====== */
.wpo-people-section {
    margin: 30px 0;
}

.wpo-people-section h4 {
    color: #2E8B57;
    margin-bottom: 20px;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.wpo-person-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    position: relative;
}

.wpo-person-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wpo-person-header h5 {
    margin: 0;
    color: #2E8B57;
    font-size: 16px;
    font-weight: 600;
}

.wpo-remove-person {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wpo-remove-person:hover {
    background: #c82333;
}

.wpo-add-person-btn {
    background: linear-gradient(45deg, #2E8B57, #228B22);
    color: white!important;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpo-add-person-btn:hover {
    background: linear-gradient(45deg, #228B22, #1E6B1E);
    transform: translateY(-1px);
}

.wpo-add-person-btn::before {
    content: "";
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0 2c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8zm-1 3h2v4h4v2h-4v4h-2v-4h-4v-2h4v-4z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* ====== WALIDACJA ====== */
.wpo-form-group input.wpo-error,
.wpo-form-group select.wpo-error,
.wpo-form-group textarea.wpo-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.wpo-error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.wpo-form-group input.wpo-success,
.wpo-form-group select.wpo-success {
    border-color: #28a745;
}

/* ====== PRZYCISKI AKCJI ====== */
.wpo-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.wpo-btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wpo-btn-cancel:hover {
    background: #5a6268;
}

.wpo-btn-submit {
    background: linear-gradient(135deg, #2E8B57, #228B22);
    color: white!important;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.wpo-btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #228B22, #1E6B1E);
    transform: translateY(-1px);
}

.wpo-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 600px) {
    .wpo-form-actions {
        flex-direction: column;
    }
    
    .wpo-form-actions button {
        width: 100%;
    }
}

/* ====== SUCCESS MESSAGE ====== */
.wpo-success-message {
    padding: 40px 30px;
    text-align: center;
}

.wpo-success-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: wpoBounce 0.6s ease-in-out;
}

@keyframes wpoBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

.wpo-success-message h3 {
    color: #2E8B57;
    margin-bottom: 15px;
    font-size: 24px;
}

.wpo-success-message p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.wpo-btn-close-modal {
    background: linear-gradient(135deg, #2E8B57, #228B22);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wpo-btn-close-modal:hover {
    background: linear-gradient(135deg, #228B22, #1E6B1E);
    transform: translateY(-1px);
}

/* ====== ANIMACJE ====== */
@keyframes wpoFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== BODY LOCK PODCZAS MODALA ====== */
body.wpo-modal-open {
    overflow: hidden;
}

/* ====== RESPONSYWNOŚĆ MODALA =
===== */
@media (max-width: 768px) {
    .wpo-trip-modal-container{
        max-width: calc(100dvw - 20px) !important;

    }
    .wpo-trip-modal-container {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .wpo-trip-modal-header {
        padding: 15px;
    }
    
    .wpo-trip-modal-header h3 {
        font-size: 20px;
    }
    
    #wpo-trip-registration-form {
        padding: 20px;
    }
    
    .wpo-trip-info {
        padding: 15px;
    }
    
    .wpo-person-item {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .wpo-trip-modal-overlay {
        padding: 0;
    }
    
    .wpo-trip-modal-container {
        border-radius: 0;
        height: 100vh;
        max-height: 100vh;
    }
    
    .wpo-trip-modal-content {
        max-height: calc(100vh - 60px);
    }
}

/* ====== ZACHOWAJ POMARAŃCZOWY STYL PRZYCISKU DLA test=1 ====== */
.wpo-test-mode .wpo-trip-register-btn {
    background: linear-gradient(135deg, #2E8B57, #228B22)
    animation: wpoTestPulse 2s infinite;
}

.wpo-test-mode .wpo-trip-register-btn:hover {
    background: linear-gradient(135deg, #e55a2b, #d7831a);
}

@keyframes wpoTestPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
    }
    50% {
        box-shadow: 0 6px 30px rgba(255, 107, 53, 0.6);
    }
}

@media (min-width: 1200px){
    .wpo-trip-register-btn{
        font-size: 23px!important;
        padding: 25px 30px!important;
    }
}
