/* assets/front-waitlist.css */

/* --- КНОПКИ (Каталог та Картка) --- */

/* 1. Кнопка в КАТАЛОЗІ */
a.button.ipro-loop-btn {
    padding: 5.5px 5px !important;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-top: 0px!important;
}

a.button.ipro-loop-btn:hover {
    background-color: #333 !important;
    border-color: #ffffff !important;
    color: #fff !important;
}

a.button.ipro-loop-btn svg {
    margin-right: 6px;
    flex-shrink: 0;
    width: 16px; 
    height: 16px;
}

@media (max-width: 360px) {
    a.button.ipro-loop-btn span { display: none; }
    a.button.ipro-loop-btn svg { margin-right: 0; }
}

/* 2. Кнопка в КАРТЦІ ТОВАРУ */
button.ipro-single-btn {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    padding: 10px 10px;
    max-width: 70%;
    width: inherit;
    background-color: #fff;
    border: 1px solid #1a73e8;
    color: #32373c;
    font-size: 17px;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button.ipro-single-btn :hover {
    background-color: #fff;
    border-color: #333;
    color: #fff;
}
button.ipro-single-btn :hover span{color: #fff;}

a.button:hover span {color: #fff;}

button.ipro-single-btn svg {
    margin-right: 10px;
    width: 20px;
    height: 20px;
}

/* --- МОДАЛЬНЕ ВІКНО --- */

#ipro-wl-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
    
    /* Фікс для мобільних (скрол і відступи) */
    overflow-y: auto; 
    padding: 10px;
    align-items: flex-start; /* Щоб не обрізало верх */
    
    opacity: 0;
    transition: opacity 0.3s ease;
}

#ipro-wl-modal.open {
    display: flex;
    opacity: 1;
}

.ipro-wl-content {
    background: #fff;
    padding: 20px 20px; /* Трохи більше повітря */
    border-radius: 12px;
    width: 95%;
    max-width: 400px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    
    /* ПОЗИЦІЯ ВІКНА: 10% зверху (щоб клавіатура не закрила) */
    margin: 10vh auto; 
    margin-bottom: 50px; /* Запас знизу для скролу */
    
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

#ipro-wl-modal.open .ipro-wl-content {
    transform: translateY(0);
}

.ipro-wl-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}
.ipro-wl-close:hover { color: #333; }

/* --- ЕЛЕМЕНТИ ВСЕРЕДИНІ МОДАЛКИ (Винесено з PHP) --- */

.ipro-wl-title {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    font-weight: 700;
}

.ipro-wl-alert {
    background: #fff4f4;
    border-left: 4px solid #d63638;
    padding: 10px;
    margin-bottom: 15px;
    text-align: left;
}

.ipro-wl-alert p {
    margin: 0;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.ipro-wl-product-name {
    color: #555;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.ipro-wl-label {
    display: block;
    text-align: left;
    font-size: 13px;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
}

/* Стилі для інпута */
#ipro-wl-phone {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px; /* Було 15px 0 */
    font-size: 17px; /* Збільшив для зручності */
    font-weight: 500;
    box-sizing: border-box;
}

/* Кнопка відправки */
#ipro-wl-submit {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
}
#ipro-wl-submit:hover { background-color: #218838; }
#ipro-wl-submit:disabled { background-color: #ccc; cursor: not-allowed; }

.ipro-wl-result {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    min-height: 20px;
}

.ipro-wl-footer-text {
    font-size: 12px;
    color: #888;
    margin-top: 15px;
    line-height: 1.4;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* Фікс для дуже низьких екранів */
@media (max-height: 500px) {
    .ipro-wl-content { margin-top: 20px; }
}

.ipro-waitlist-trigger .ipro-loop-btn span:hover{
   color: #fff!important; 
}