/* PopupCraft Frontend Styles */

.popupcraft-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.popupcraft-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.popupcraft-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    animation: popupcraft-fadeIn 0.3s ease-out;
}

@keyframes popupcraft-fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.popupcraft-modal-content {
    padding: 30px;
    position: relative;
}

.popupcraft-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popupcraft-close:hover {
    background: #f0f0f0;
    color: #333;
}

.popupcraft-form-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.popupcraft-form {
    max-width: 400px;
    margin: 0 auto;
}

.popupcraft-field {
    margin-bottom: 20px;
}

.popupcraft-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.popupcraft-field .required {
    color: #e74c3c;
}

.popupcraft-input,
.popupcraft-textarea,
.popupcraft-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.popupcraft-input:focus,
.popupcraft-textarea:focus,
.popupcraft-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.popupcraft-textarea {
    resize: vertical;
    min-height: 100px;
}

.popupcraft-form-actions {
    text-align: center;
    margin-top: 25px;
}

.popupcraft-submit-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 120px;
}

.popupcraft-submit-btn:hover {
    background: #2980b9;
}

.popupcraft-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.popupcraft-success-message {
    text-align: center;
    padding: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    color: #155724;
    margin-top: 20px;
}

.popupcraft-error-message {
    text-align: center;
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    color: #721c24;
    margin-top: 15px;
}

.popupcraft-trigger {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.popupcraft-trigger:hover {
    background: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .popupcraft-modal {
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
    
    .popupcraft-modal-content {
        padding: 20px;
    }
    
    .popupcraft-form-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .popupcraft-modal-content {
        padding: 15px;
    }
    
    .popupcraft-input,
    .popupcraft-textarea,
    .popupcraft-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}