/* RA Deck Widget — Capital House Media */

#radw-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* ---- Tab trigger ---- */
#radw-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2c2c2c;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
}

#radw-tab:hover {
    background: #111;
    transform: translateY(-2px);
}

.radw-tab-icon {
    font-size: 17px;
    line-height: 1;
}

/* ---- Panel ---- */
#radw-panel {
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    margin-bottom: 12px;

    /* animation */
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    transform-origin: bottom right;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

#radw-panel.radw-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* ---- Header ---- */
.radw-header {
    background: #2c2c2c;
    color: #fff;
    padding: 20px 20px 16px;
}

.radw-header h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.radw-header p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.78);
}

/* ---- Form fields ---- */
#radw-fields {
    padding: 18px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#radw-fields label {
    font-size: 12px;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 8px;
    margin-bottom: 2px;
}

#radw-fields label:first-child {
    margin-top: 0;
}

#radw-fields input,
#radw-fields textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: 9px 11px;
    font-size: 14px;
    color: #222;
    background: #fafafa;
    transition: border-color 0.15s;
    font-family: inherit;
    resize: none;
}

#radw-fields input:focus,
#radw-fields textarea:focus {
    outline: none;
    border-color: #2c2c2c;
    background: #fff;
}

/* ---- Submit button ---- */
#radw-submit {
    margin-top: 14px;
    width: 100%;
    background: #2c2c2c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    letter-spacing: 0.01em;
}

#radw-submit:hover {
    background: #111;
}

#radw-submit:disabled {
    background: #888;
    cursor: not-allowed;
}

.radw-fine {
    margin: 8px 0 0;
    font-size: 11px;
    color: #999;
    text-align: center;
}

/* ---- Success state ---- */
#radw-success {
    padding: 28px 20px;
    text-align: center;
}

.radw-success-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2c2c2c;
    color: #fff;
    font-size: 22px;
    line-height: 44px;
    margin: 0 auto 14px;
}

#radw-success h4 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

#radw-success p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* ---- Error state ---- */
#radw-error {
    padding: 16px 20px;
    background: #fff5f5;
    border-top: 1px solid #ffd5d5;
}

#radw-error p {
    margin: 0;
    font-size: 13px;
    color: #c00;
}

#radw-error a {
    color: #2c2c2c;
    font-weight: 600;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
    #radw-widget {
        bottom: 12px;
        right: 12px;
        left: 12px;
        align-items: stretch;
    }

    #radw-panel {
        width: 100%;
    }

    #radw-tab {
        align-self: flex-end;
    }
}
