/* ── Corporate Discount Widget ──────────────────────────────────────────────── */

.cd-widget {
    background: linear-gradient( 135deg, #fff8f0 0%, #fff3f8 100% );
    border: 2px solid #e8b4c8;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba( 0,0,0,0.06 );
    transition: box-shadow .2s ease;
}

.cd-widget:hover {
    box-shadow: 0 4px 16px rgba( 0,0,0,0.10 );
}

.cd-widget__inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
}

.cd-widget__icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.cd-widget__body {
    flex: 1;
}

.cd-widget__title {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #3d1a2e;
}

.cd-widget__subtitle {
    margin: 0 0 14px;
    color: #7a4060;
    font-size: 0.9rem;
}

/* ── Form row ─────────────────────────────────────────────────────────────── */

.cd-widget__form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#cd-company-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px !important;
    border: 1.5px solid #d8a0b8 !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    outline: none !important;
    transition: border-color .2s ease;
    background: #fff !important;
}

#cd-company-input:focus {
    border-color: #b5497a !important;
    box-shadow: 0 0 0 3px rgba( 181,73,122,0.12 ) !important;
}

#cd-verify-btn {
    background: linear-gradient( 135deg, #c0396b, #8b2252 ) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    white-space: nowrap;
    transition: opacity .15s ease, transform .1s ease !important;
}

#cd-verify-btn:hover:not(:disabled) {
    opacity: 0.9 !important;
    transform: translateY(-1px);
}

#cd-verify-btn:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
}

/* ── Result messages ──────────────────────────────────────────────────────── */

.cd-widget__result {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.92rem;
    display: none;
}

.cd-widget__result--success {
    display: block;
    background: #e8f9ee;
    border: 1.5px solid #5cb85c;
    color: #2d6a2d;
}

.cd-widget__result--error {
    display: block;
    background: #fef0f0;
    border: 1.5px solid #e07070;
    color: #8b2222;
}

/* ── Already-verified banner ─────────────────────────────────────────────── */

.cd-widget__success {
    background: #e8f9ee;
    border: 1.5px solid #5cb85c;
    border-radius: 8px;
    padding: 12px 16px;
    color: #2d6a2d;
    font-size: 0.92rem;
}

.cd-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #5cb85c;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    margin-right: 8px;
    font-weight: 700;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */

.cd-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #b5497a;
    border-top-color: transparent;
    border-radius: 50%;
    animation: cd-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes cd-spin {
    to { transform: rotate( 360deg ); }
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */

@media ( max-width: 480px ) {
    .cd-widget__inner  { flex-direction: column; gap: 8px; }
    .cd-widget__form   { flex-direction: column; }
    #cd-verify-btn     { width: 100% !important; }
    #cd-company-input  { width: 100% !important; }
}
