/* Sala de Prensa (Humana Comunicaciones S.A.S.) - frontend styles
   Wraps the whole shortcode output in a clean card, regardless of the
   theme/page-builder markup around it (Elementor, Gutenberg, etc.) */

.ap-form-wrapper {
    background: #f7f7f8;
    border: 1px solid #e3e3e5;
    border-radius: 12px;
    padding: 24px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Our card always keeps a light background, so force readable dark text regardless of
   whether the site/theme is in light or dark mode - otherwise labels/headings can inherit
   near-white text from the theme's dark mode and become almost invisible. */
.ap-form-wrapper h2,
.ap-form-wrapper h3,
.ap-form-wrapper p,
.ap-form-wrapper label,
.ap-form-wrapper .ap-registration-intro,
.ap-form-wrapper .ap-checkbox-inline,
.ap-form-wrapper .math-captcha,
.ap-form-wrapper .ap-payment-notice-text,
.ap-form-wrapper select,
.ap-form-wrapper option {
    color: #1a1a1a !important;
}
.ap-form-wrapper input[type="text"],
.ap-form-wrapper input[type="email"],
.ap-form-wrapper textarea {
    color: #1a1a1a !important;
}

.ap-form-wrapper h2 {
    margin-top: 0;
    font-size: 20px;
}

.ap-form-field-wrapper {
    margin-bottom: 18px;
    margin-top: 0;
}

.ap-form-field-wrapper label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

.ap-form-field input[type="text"],
.ap-form-field input[type="email"],
.ap-form-field-wrapper > input[type="text"],
.ap-form-field-wrapper > input[type="email"] {
    height: 42px;
    padding: 0 14px;
    width: 100%;
    background: #fff;
    border: 1px solid #d8d8db;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color .15s ease;
}

.ap-form-field input[type="text"]:focus,
.ap-form-field input[type="email"]:focus,
.ap-form-field-wrapper > input[type="text"]:focus,
.ap-form-field-wrapper > input[type="email"]:focus {
    outline: none;
    border-color: #2ea2cc;
}

.ap-form_field textarea,
.ap-form-field textarea {
    width: 100%;
    background: #fff;
    border: 1px solid #d8d8db;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    box-sizing: border-box;
}

.ap-form_field select {
    height: 42px;
    width: 100%;
    background: #fff;
    border: 1px solid #d8d8db;
    border-radius: 8px;
    padding: 0 12px;
    box-sizing: border-box;
    font-size: 14px;
}

.ap-form-error-message {
    color: #c0392b;
    font-size: 13px;
    margin-top: 4px;
}

#ap-captcha-result {
    width: 140px;
    margin-left: 10px;
    height: 42px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #d8d8db;
    border-radius: 8px;
    box-sizing: border-box;
}

div.mce-tinymce,
.ap-form-content-editor {
    border: 1px solid #d8d8db !important;
    border-radius: 8px;
    overflow: hidden;
}

/* File upload - restyle the native "Choose file" button via the modern
   file-selector-button pseudo-elements, no extra JS needed */
.ap-form-field input[type="file"] {
    border: none;
    padding: 0;
    font-size: 14px;
}
.ap-form-field input[type="file"]::file-selector-button,
.ap-form-field input[type="file"]::-webkit-file-upload-button {
    background: #2ea2cc;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    margin-right: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}
.ap-form-field input[type="file"]:hover::file-selector-button,
.ap-form-field input[type="file"]:hover::-webkit-file-upload-button {
    background: #2591b8;
}

/* Submit buttons (Registrarme / Pagar y Publicar / Publicar Nota) */
.ap-form-submit-button,
.ap-main-submit-button {
    background: #2ea2cc;
    border: 1px solid #1f8fb8;
    box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 2px rgba(0, 0, 0, 0.1);
    color: #fff;
    text-decoration: none !important;
    border-radius: 8px;
    cursor: pointer;
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    margin: 0;
    padding: 13px 26px;
    white-space: nowrap;
    text-align: center;
    transition: background .15s ease;
}
.ap-form-submit-button:hover,
.ap-main-submit-button:hover {
    background: #2591b8;
    color: #fff;
}
.ap-form-submit-button:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.ap-file-field-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.ap-remove-file-btn {
    display: none;
    background: #fdecea;
    border: 1px solid #f5b3ac;
    color: #a33;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.ap-remove-file-btn:hover {
    background: #f9d6d2;
}
.ap-remove-file-btn.ap-remove-file-btn-visible {
    display: inline-block;
}

.ap-registration-intro {
    margin-bottom: 20px;
    color: #555;
    font-size: 14px;
}

.ap-privacy-wrapper .ap-checkbox-inline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
}
.ap-privacy-wrapper .ap-checkbox-inline input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.ap-privacy-wrapper a {
    color: #2ea2cc;
    text-decoration: underline;
}

/* Payment gate additions */
.ap-payment-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #2ea2cc;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-size: 14.5px;
    line-height: 1.6;
    color: #374151;
}
.ap-payment-notice-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    color: #2ea2cc;
}
.ap-payment-notice-text {
    flex: 1;
}
.ap-payment-error-message {
    background: #fdecea;
    border: 1px solid #f5b3ac;
    color: #a33;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

/* Upload/processing loader overlay */
.ap-upload-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 25, 0.6);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}
.ap-upload-overlay.ap-upload-overlay-active {
    display: flex;
}
.ap-upload-box {
    background: #fff;
    border-radius: 14px;
    padding: 32px 36px;
    width: 320px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.ap-upload-spinner {
    display: none;
    margin: 0 auto 18px;
    width: 42px;
    height: 42px;
    border: 4px solid #e3e3e5;
    border-top-color: #2ea2cc;
    border-radius: 50%;
    animation: ap-spin 0.8s linear infinite;
}
@keyframes ap-spin {
    to { transform: rotate(360deg); }
}
.ap-upload-status {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 14px;
}
.ap-upload-progress-track {
    display: none;
    background: #eceef0;
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.ap-upload-progress-bar {
    background: #2ea2cc;
    height: 100%;
    width: 0%;
    transition: width 0.15s ease;
}
.ap-upload-percent {
    display: none;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}
.ap-upload-note {
    font-size: 12px;
    color: #888;
}

/* Success popup */
.ap-success-popup-overlay {
    display: flex;
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 25, 0.6);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease;
}
.ap-success-popup-overlay.ap-success-popup-overlay-active {
    opacity: 1;
    visibility: visible;
}
.ap-success-popup-box {
    background: #fff;
    border-radius: 14px;
    padding: 36px 32px 28px;
    width: 360px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.ap-success-popup-icon {
    width: 52px;
    height: 52px;
    line-height: 52px;
    margin: 0 auto 16px;
    background: #e6f7ec;
    color: #1f9d55;
    border-radius: 50%;
    font-size: 26px;
    font-weight: bold;
}
.ap-success-popup-message {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 22px;
}
.ap-success-popup-close {
    background: #2ea2cc;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.ap-success-popup-close:hover {
    background: #2591b8;
}
