/**
 * CIB Adomány Popup Styles
 * 
 * Waldorf-stílushoz illeszkedő design
 */

/* Overlay */
.cib-adomany-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Popup container */
.cib-adomany-popup {
    background: #fff;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: cib-popup-appear 0.3s ease-out;
}

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

/* Header */
.cib-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, #4a7c59 0%, #2e5339 100%);
    border-radius: 12px 12px 0 0;
}

.cib-popup-header h2 {
    margin: 0;
    padding: 0;
    font-size: 1.3rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.2;
}

.cib-popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.cib-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Form */
.cib-adomany-form {
    padding: 16px 20px 20px;
}

.cib-form-group {
    margin-bottom: 14px;
}

.cib-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.cib-form-group .required {
    color: #d32f2f;
}

/* Összeg gombok */
.cib-amount-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.cib-amount-option {
    position: relative;
    cursor: pointer;
}

.cib-amount-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cib-amount-option span {
    display: block;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.15s;
    background: #f9f9f9;
}

.cib-amount-option input:checked + span {
    border-color: #2e5339;
    background: #2e5339;
    color: #fff;
    box-shadow: 0 2px 8px rgba(46, 83, 57, 0.3);
}

.cib-amount-option:hover span {
    border-color: #4a7c59;
}

.cib-amount-custom {
    grid-column: span 2;
}

/* Egyedi összeg input */
.cib-custom-amount {
    margin-top: 8px;
    position: relative;
}

.cib-custom-amount .cib-input {
    padding-right: 40px;
}

.cib-currency {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Input mezők */
.cib-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.cib-input:focus {
    outline: none;
    border-color: #4a7c59;
}

.cib-input::placeholder {
    color: #999;
}

/* Checkbox */
.cib-checkbox-group {
    margin-top: 16px;
}

.cib-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1.3;
    color: #555;
}

.cib-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    cursor: pointer;
    accent-color: #4a7c59;
}

.cib-checkbox-label a {
    color: #4a7c59;
    text-decoration: underline;
}

/* Error message */
.cib-error-message {
    background: #ffebee;
    border: 1px solid #f44336;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* Submit gomb */
.cib-form-actions {
    margin-top: 16px;
}

.cib-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #4a7c59 0%, #2e5339 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    line-height: 1.4;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.cib-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.4);
}

.cib-submit-btn:active {
    transform: translateY(0);
}

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

/* Kártya logók */
.cib-card-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.cib-card-logos img {
    height: 20px;
    opacity: 0.6;
}

/* Bank info */
.cib-bank-info {
    text-align: center;
    margin-top: 8px;
    color: #999;
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 480px) {
    .cib-adomany-popup {
        border-radius: 10px;
    }
    
    .cib-popup-header {
        padding: 12px 16px;
        border-radius: 10px 10px 0 0;
    }
    
    .cib-popup-header h2 {
        font-size: 1.1rem;
    }
    
    .cib-adomany-form {
        padding: 14px 16px 18px;
    }
    
    .cib-amount-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cib-amount-custom {
        grid-column: span 2;
    }
}

/* ===========================================
   KÖSZÖNŐ OLDAL (shortcode: cib_adomany_koszonet)
   =========================================== */

.cib-adomany-koszonet {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.cib-adomany-koszonet-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: cib-bounce 1s ease-in-out;
}

@keyframes cib-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.cib-adomany-koszonet h2 {
    color: #2e5339;
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.cib-adomany-koszonet-message {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.cib-adomany-koszonet-details {
    background: #f8faf8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.cib-adomany-koszonet-details table {
    width: 100%;
    border-collapse: collapse;
}

.cib-adomany-koszonet-details td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.cib-adomany-koszonet-details tr:last-child td {
    border-bottom: none;
}

.cib-adomany-koszonet-details td:first-child {
    color: #666;
    width: 50%;
}

.cib-adomany-koszonet-details td:last-child {
    font-weight: 600;
    color: #2e5339;
}

.cib-adomany-koszonet-email {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
}

/* ===========================================
   HIBA OLDAL (shortcode: cib_adomany_hiba)
   =========================================== */

.cib-adomany-hiba {
    max-width: 500px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.cib-adomany-hiba-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.cib-adomany-hiba h2 {
    color: #c62828;
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.cib-adomany-hiba-message {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    background: #fff3e0;
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 4px solid #ff9800;
}

.cib-adomany-hiba .cib-adomany-btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #4a7c59 0%, #2e5339 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cib-adomany-hiba .cib-adomany-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.4);
    color: #fff;
}

.cib-adomany-hiba-details {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.cib-adomany-hiba-details table {
    width: 100%;
    border-collapse: collapse;
}

.cib-adomany-hiba-details td {
    padding: 8px 12px;
    border-bottom: 1px solid #e8e8e8;
    font-size: 0.9rem;
}

.cib-adomany-hiba-details tr:last-child td {
    border-bottom: none;
}

.cib-adomany-hiba-details td:first-child {
    color: #666;
    width: 50%;
}

/* ===========================================
   ÁLTALÁNOS GOMB STÍLUS
   =========================================== */

.cib-adomany-btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #4a7c59 0%, #2e5339 100%);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cib-adomany-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.4);
    color: #fff;
}
