/**
 * Styles CSS pour le plugin Post Notification
 */

/* Formulaire Newsletter */
.pn-newsletter-form {
    margin: 20px 0;
}

.pn-newsletter-form input[type="text"],
.pn-newsletter-form input[type="email"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.pn-newsletter-form input[type="text"]:focus,
.pn-newsletter-form input[type="email"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.pn-newsletter-form button[type="submit"],
.pn-submit-button {
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.pn-newsletter-form button[type="submit"]:hover,
.pn-submit-button:hover {
    background-color: #005a87;
}

/* Messages */
.pn-message {
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
    text-align: center;
}

.pn-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pn-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Shortcode Styles */
.pn-newsletter-shortcode {
    max-width: 500px;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.pn-newsletter-shortcode h3 {
    margin-top: 0;
    color: #333;
}

.pn-form-field {
    margin-bottom: 15px;
}

.pn-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

/* Modal Popup */
#pn-popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.pn-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.pn-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.pn-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 20px;
}

.pn-modal-close:hover {
    color: #000;
}

.pn-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

/* Button Style */
.pn-newsletter-button {
    background-color: #0073aa;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pn-newsletter-button:hover {
    background-color: #005a87;
}

/* Widget Styles */
.widget .pn-newsletter-form {
    margin: 0;
}

.widget .pn-newsletter-form input {
    font-size: 14px;
    padding: 8px;
}

.widget .pn-newsletter-form button {
    font-size: 14px;
    padding: 8px 16px;
}

/* Loading State */
.pn-loading {
    opacity: 0.6;
    pointer-events: none;
}

.pn-loading button {
    position: relative;
}

.pn-loading button:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spinner 1s linear infinite;
}

@keyframes spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .pn-newsletter-shortcode {
        padding: 15px;
    }
    
    .pn-modal-content {
        width: 95%;
        padding: 20px;
    }
}
