/**
 * GMoney Formulario de Postulación - CSS Styling System
 * Exact visual match with referencia-formulario.jpg
 * Author: Valsan Fox
 * Text Domain: gmoney-postula-form
 */

/* ====================================================
   1. CONTAINER CARD (#dde5e7 SOFT GREY/CYAN BG)
   ==================================================== */
.gmoney-postula-card {
    position: relative;
    width: 100%;
    background-color: #dde5e7;
    border-radius: 24px;
    padding: 44px 44px;
    box-sizing: border-box;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (max-width: 767px) {
    .gmoney-postula-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
}

/* ====================================================
   2. VERTICAL STACK LAYOUT
   ==================================================== */
.gmoney-postula-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.gmoney-postula-field-group {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* ====================================================
   3. WHITE PILL INPUTS
   ==================================================== */
.gmoney-postula-input {
    width: 100%;
    min-height: 54px;
    background-color: #ffffff;
    border: 1.5px solid transparent;
    border-radius: 50px;
    padding: 16px 28px;
    font-family: 'Helvetica Now Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: #182b39;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.gmoney-postula-input::placeholder {
    color: #7f92a0;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.gmoney-postula-input:focus::placeholder {
    opacity: 0.6;
}

.gmoney-postula-input:focus {
    border-color: #0075f4 !important;
    box-shadow: 0 0 0 3px rgba(0, 117, 244, 0.18);
    background-color: #ffffff;
}

/* ====================================================
   4. BOTTOM ROW SPLIT (CARGAR CV + BOTÓN ENVIAR SOLICITUD)
   ==================================================== */
.gmoney-postula-row-split {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .gmoney-postula-row-split {
        flex-direction: column;
        gap: 14px;
    }
}

.gmoney-postula-row-split .gmoney-postula-file-group {
    flex: 1.3;
}

.gmoney-postula-row-split .gmoney-postula-action-group {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

@media (max-width: 600px) {
    .gmoney-postula-row-split .gmoney-postula-file-group,
    .gmoney-postula-row-split .gmoney-postula-action-group {
        width: 100%;
        flex: none;
    }
}

/* Custom Cargar CV Box (White Pill) */
.gmoney-postula-file-wrapper {
    position: relative;
    width: 100%;
    min-height: 54px;
    background-color: #ffffff;
    border: 1.5px solid transparent;
    border-radius: 50px;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.gmoney-postula-file-wrapper:hover,
.gmoney-postula-file-wrapper.is-focused {
    border-color: #0075f4 !important;
    box-shadow: 0 0 0 3px rgba(0, 117, 244, 0.18);
}

.gmoney-postula-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.gmoney-postula-file-name {
    font-family: 'Helvetica Now Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: #7f92a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    width: 100%;
}

.gmoney-postula-file-wrapper.has-file {
    border-color: #34c759;
    background-color: #ffffff;
}

.gmoney-postula-file-wrapper.has-file .gmoney-postula-file-name {
    color: #182b39;
    font-weight: 500;
}

/* ====================================================
   5. BLUE SUBMIT BUTTON (#0075f4 PILL)
   ==================================================== */
.gmoney-postula-action-group {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.gmoney-postula-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    background-color: #0075f4;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 16px 28px;
    font-family: 'Helvetica Now Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    outline: none;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
    box-shadow: none;
}

.gmoney-postula-btn-text {
    font-weight: 700;
}

.gmoney-postula-submit-btn:hover {
    background-color: #fec202;
    color: #182b39;
    transform: translateY(-1px);
    box-shadow: none;
}

.gmoney-postula-submit-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.gmoney-postula-submit-btn:disabled,
.gmoney-postula-submit-btn.is-loading {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner Animation */
.gmoney-postula-spinner {
    width: 20px;
    height: 20px;
    animation: gmoney-rotate 1.4s linear infinite;
}

.gmoney-postula-spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: gmoney-dash 1.4s ease-in-out infinite;
}

@keyframes gmoney-rotate {
    100% { transform: rotate(360deg); }
}

@keyframes gmoney-dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* ====================================================
   6. ALERT FEEDBACK & INVALID STATES
   ==================================================== */
.gmoney-postula-input.is-invalid,
.gmoney-postula-file-wrapper.is-invalid {
    border-color: #ff3b30 !important;
    background-color: #fff8f8 !important;
    animation: gmoney-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes gmoney-shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.gmoney-postula-alert-box {
    margin-bottom: 16px;
    padding: 12px 20px;
    border-radius: 40px;
    font-family: 'Helvetica Now Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    box-sizing: border-box;
}

.gmoney-postula-alert-box.alert-error {
    background-color: #ffebe9;
    color: #d70015;
    border: 1px solid #ffc3c0;
}

.gmoney-postula-alert-box.alert-success {
    background-color: #eafbf0;
    color: #1b7a36;
    border: 1px solid #b7f0c8;
}

/* ====================================================
   7. STATE 2: SUCCESS CONFIRMATION (referencia-formulario.jpg)
   ==================================================== */
.gmoney-postula-form-element {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.gmoney-postula-container.is-submitting-success .gmoney-postula-form-element {
    opacity: 0;
    transform: translateY(-15px);
    pointer-events: none;
}

.gmoney-postula-success-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    min-height: 280px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.gmoney-postula-container.gmoney-postula-state-success .gmoney-postula-success-box,
.gmoney-postula-container.is-success .gmoney-postula-success-box {
    opacity: 1;
    transform: translateY(0);
}

/* Blue Solid Badge with Checkmark */
.gmoney-postula-success-badge {
    width: 48px;
    height: 48px;
    background-color: #0075f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 6px 16px rgba(0, 117, 244, 0.25);
    transform: scale(0.8);
    animation: gmoney-pop-check 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.15s;
}

@keyframes gmoney-pop-check {
    to { transform: scale(1); }
}

.gmoney-postula-check-svg {
    width: 22px;
    height: 22px;
}

.gmoney-postula-success-title {
    font-family: 'Helvetica Now Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #000000;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.gmoney-postula-success-subtitle {
    font-family: 'Helvetica Now Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.5;
    color: #182b39;
    max-width: 460px;
    margin: 0;
}
