/* =====================================================
   Genocells Popup Form — Frontend Styles
   Matches Genocells branding (navy + orange)
   ===================================================== */

:root {
    --gcp-green:        #1a3f5c;
    --gcp-green-dark:   #0f2740;
    --gcp-green-light:  #2a6496;
    --gcp-green-pale:   #e8f1f8;
    --gcp-orange:       #f47920;
    --gcp-orange-dark:  #d4620f;
    --gcp-white:        #ffffff;
    --gcp-text:         #1a1a1a;
    --gcp-text-mid:     #444444;
    --gcp-border:       #c5d8e8;
    --gcp-radius:       35px;
    --gcp-radius-inner: 20px;
    --gcp-shadow:       0 20px 60px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Overlay */
#gcp-overlay {
    display:          none;
    position:         fixed;
    inset:            0;
    background:       rgba(0, 0, 0, 0.55);
    backdrop-filter:  blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index:          99999;
    align-items:      center;
    justify-content:  center;
    padding:          20px;
    box-sizing:       border-box;
}

#gcp-overlay.gcp-visible {
    display: flex;
    animation: gcpFadeIn 0.25s ease;
}

@keyframes gcpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal */
#gcp-modal {
    background:     var(--gcp-white);
    border-radius:  var(--gcp-radius);
    box-shadow:     var(--gcp-shadow);
    max-width:      520px;
    width:          100%;
    max-height:     90vh;
    display:        flex;
    flex-direction: column;
    overflow:       hidden;
    animation:      gcpSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position:       relative;
}

@keyframes gcpSlideUp {
    from { transform: translateY(30px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* Header strip */
.gcp-modal-header {
    background:      linear-gradient(135deg, var(--gcp-green-dark) 0%, var(--gcp-green) 100%);
    padding:         22px 35px 20px;
    position:        relative;
}

.gcp-modal-header h2 {
    color:        var(--gcp-white);
    margin:       0 0 4px;
    font-size:    1.35rem;
    font-weight:  700;
    font-family:  inherit;
    line-height:  1.25;
    letter-spacing: -0.02em;
}

.gcp-modal-header p {
    color:     rgba(255,255,255,0.85);
    margin:    0;
    font-size: 0.875rem;
    font-family: inherit;
}

/* Close button */
.gcp-close {
    position:   absolute;
    top:        14px;
    right:      18px;
    background: rgba(255,255,255,0.2);
    border:     none;
    color:      var(--gcp-white);
    width:      32px;
    height:     32px;
    border-radius: 50%;
    font-size:  18px;
    line-height: 1;
    cursor:     pointer;
    display:    flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding:    0;
}
.gcp-close:hover { background: rgba(255,255,255,0.35); }

/* Body */
.gcp-modal-body {
    padding:    24px 35px 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Step heading */
.gcp-step-label {
    font-size:    0.7rem;
    font-weight:  700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color:        var(--gcp-green);
    margin:       0 0 8px;
    font-family:  inherit;
}

.gcp-question {
    font-size:   1.05rem;
    font-weight: 600;
    color:       var(--gcp-text);
    margin:      0 0 20px;
    line-height: 1.4;
    font-family: inherit;
}

/* Yes/No buttons */
.gcp-yn-group {
    display: flex;
    gap:     12px;
}

.gcp-yn-btn {
    flex:          1;
    padding:       12px 20px;
    border-radius: var(--gcp-radius-inner);
    border:        2px solid var(--gcp-border);
    background:    var(--gcp-white);
    color:         var(--gcp-text-mid);
    font-size:     0.95rem;
    font-weight:   600;
    cursor:        pointer;
    transition:    all 0.18s ease;
    font-family:   inherit;
}

.gcp-yn-btn:hover {
    border-color: var(--gcp-green);
    color:        var(--gcp-green);
    background:   var(--gcp-green-pale);
}

.gcp-yn-btn.gcp-yes:hover,
.gcp-yn-btn.gcp-yes:focus {
    background:   var(--gcp-orange);
    border-color: var(--gcp-orange);
    color:        var(--gcp-white);
}

.gcp-yn-btn.gcp-no:hover,
.gcp-yn-btn.gcp-no:focus {
    background:   #c62828;
    border-color: #c62828;
    color:        var(--gcp-white);
}

/* Rejection message */
.gcp-rejection {
    text-align:    center;
    padding:       10px 0 5px;
}

.gcp-rejection-icon {
    font-size:  2.5rem;
    line-height: 1;
    margin-bottom: 12px;
}

.gcp-rejection h3 {
    color:       #c62828;
    font-size:   1rem;
    font-weight: 700;
    margin:      0 0 10px;
    font-family: inherit;
    line-height: 1.4;
}

.gcp-rejection p {
    color:     var(--gcp-text-mid);
    font-size: 0.875rem;
    margin:    0 0 20px;
    font-family: inherit;
    line-height: 1.5;
}

.gcp-restart-btn {
    background:    transparent;
    border:        2px solid var(--gcp-border);
    color:         var(--gcp-text-mid);
    border-radius: var(--gcp-radius-inner);
    padding:       9px 22px;
    font-size:     0.85rem;
    font-weight:   600;
    cursor:        pointer;
    transition:    all 0.18s;
    font-family:   inherit;
}
.gcp-restart-btn:hover {
    border-color: var(--gcp-green);
    color:        var(--gcp-green);
}

/* Divider between steps */
.gcp-divider {
    border: none;
    border-top: 1px solid var(--gcp-border);
    margin: 24px 0;
}

/* Form fields */
.gcp-field {
    margin-bottom: 12px;
}

.gcp-field label {
    display:     block;
    font-size:   0.82rem;
    font-weight: 600;
    color:       var(--gcp-text-mid);
    margin-bottom: 6px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gcp-field input[type="text"],
.gcp-field input[type="tel"] {
    width:         100%;
    padding:       11px 16px;
    border:        2px solid var(--gcp-border);
    border-radius: var(--gcp-radius-inner);
    font-size:     0.95rem;
    color:         var(--gcp-text);
    background:    var(--gcp-white);
    transition:    border-color 0.18s, box-shadow 0.18s;
    box-sizing:    border-box;
    font-family:   inherit;
    outline:       none;
}

.gcp-field input:focus {
    border-color: var(--gcp-green);
    box-shadow:   0 0 0 3px rgba(26, 63, 92, 0.12);
}

/* Submit button */
.gcp-submit-btn {
    width:         100%;
    margin-top:    8px;
    padding:       14px 20px;
    background:    linear-gradient(135deg, var(--gcp-orange) 0%, var(--gcp-orange-dark) 100%);
    color:         var(--gcp-white);
    border:        none;
    border-radius: var(--gcp-radius-inner);
    font-size:     1rem;
    font-weight:   700;
    cursor:        pointer;
    transition:    opacity 0.2s, transform 0.15s;
    font-family:   inherit;
    letter-spacing: 0.01em;
}

.gcp-submit-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.gcp-submit-btn:active { transform: translateY(0); }
.gcp-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Success state */
.gcp-success {
    text-align: center;
    padding:    10px 0 5px;
}

.gcp-success-icon {
    font-size:     3rem;
    line-height:   1;
    margin-bottom: 14px;
}

.gcp-success h3 {
    color:       var(--gcp-green);
    font-size:   1.15rem;
    font-weight: 700;
    margin:      0 0 10px;
    font-family: inherit;
}

.gcp-success p {
    color:     var(--gcp-text-mid);
    font-size: 0.9rem;
    margin:    0;
    font-family: inherit;
    line-height: 1.5;
}

/* Error message */
.gcp-error-msg {
    background:    #ffebee;
    border:        1px solid #ef9a9a;
    border-radius: 12px;
    color:         #c62828;
    font-size:     0.875rem;
    padding:       10px 14px;
    margin-top:    14px;
    display:       none;
    font-family:   inherit;
}

/* Spinner */
.gcp-spinner {
    display:       inline-block;
    width:         16px;
    height:        16px;
    border:        2px solid rgba(255,255,255,0.4);
    border-top-color: var(--gcp-white);
    border-radius: 50%;
    animation:     gcpSpin 0.7s linear infinite;
    vertical-align: middle;
    margin-right:  8px;
}

@keyframes gcpSpin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 560px) {
    #gcp-modal {
        border-bottom-left-radius:  var(--gcp-radius);
        border-bottom-right-radius: var(--gcp-radius);
    }
    .gcp-modal-header { padding: 22px 24px 20px; }
    .gcp-modal-body   { padding: 24px 24px 28px; }
    .gcp-yn-group     { flex-direction: column; }
}
