/* ═══════════════════════════════════════════════════════
   Cardame Reminders — Opt-In Form
   ═══════════════════════════════════════════════════════ */

.cr-optin-wrap {
    max-width: 640px;
    margin: 0 auto;
    font-family: inherit;
}

.cr-form-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
}

.cr-form-subtitle {
    font-size: 16px;
    color: #555;
    margin: 0 0 28px;
    line-height: 1.5;
}

/* Messages */
.cr-msg {
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.cr-msg--success { background: #eafaf1; border: 1px solid #27ae60; color: #1d6e40; }
.cr-msg--error   { background: #fdf3f2; border: 1px solid #e74c3c; color: #922b21; }

/* Fieldset */
.cr-optin-form .cr-fieldset {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 0 0 24px;
}
.cr-optin-form .cr-fieldset + .cr-fieldset { margin-top: 0; }

.cr-legend {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    padding: 0 6px;
}
.cr-legend-sub {
    font-size: 13px;
    color: #777;
    margin: -4px 0 16px;
}

/* Grid row */
.cr-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.cr-row:last-child { margin-bottom: 0; }
.cr-col { display: flex; flex-direction: column; }

/* Labels and inputs */
.cr-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: block;
}
.cr-req { color: #e74c3c; }

.cr-input {
    padding: 10px 13px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
    color: #222;
}
.cr-input:focus {
    border-color: #3d7ebe;
    box-shadow: 0 0 0 3px rgba(61,126,190,.15);
    outline: none;
}
.cr-hint {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Friend rows */
.cr-friend-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.cr-friend-num {
    width: 26px;
    height: 26px;
    min-width: 26px;
    background: #3d7ebe;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cr-friend-fields {
    display: flex;
    gap: 10px;
    flex: 1;
}
.cr-friend-name { flex: 2; }
.cr-friend-bday { flex: 1; max-width: 110px; text-align: center; letter-spacing: 1px; }

.cr-remove-row {
    background: none;
    border: none;
    color: #aaa;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color .15s;
}
.cr-remove-row:hover { color: #e74c3c; }

.cr-remove-placeholder { width: 28px; display: inline-block; }

.cr-add-row-btn {
    background: none;
    border: 1px dashed #aaa;
    border-radius: 5px;
    color: #555;
    font-size: 14px;
    padding: 7px 14px;
    cursor: pointer;
    margin-top: 4px;
    transition: border-color .15s, color .15s;
    width: 100%;
}
.cr-add-row-btn:hover { border-color: #3d7ebe; color: #3d7ebe; }

/* Consent text */
.cr-consent {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    margin: 0 0 20px;
}

/* Submit button */
.cr-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #3d7ebe;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 13px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background .15s;
}
.cr-submit-btn:hover { background: #2d6aad; }
.cr-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Spinner */
.cr-spinner {
    width: 18px; height: 18px;
    border: 3px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cr-spin .7s linear infinite;
    display: none;
}
@keyframes cr-spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 560px) {
    .cr-row { grid-template-columns: 1fr; }
    .cr-friend-fields { flex-direction: column; }
    .cr-friend-bday { max-width: 100%; }
}
