/* STW Coupon Generator — Frontend Styles */

.stw-coupon-frontend-form {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.stw-coupon-frontend-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.stw-coupon-field {
    margin-bottom: 16px;
}

.stw-coupon-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.stw-coupon-field input[type="text"],
.stw-coupon-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.stw-coupon-field textarea {
    resize: vertical;
}

.stw-coupon-field fieldset label {
    font-weight: normal;
    display: block;
    margin-bottom: 6px;
}

.stw-coupon-field .description {
    color: #666;
    font-size: 13px;
}

.stw-coupon-field .required {
    color: #d63638;
}

.stw-coupon-frontend-form .button {
    display: inline-block;
    padding: 10px 24px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.stw-coupon-frontend-form .button:hover {
    background: #135e96;
}

.stw-coupon-frontend-form .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.stw-spinner {
    display: inline-block;
    margin-left: 8px;
    color: #666;
    font-style: italic;
}

/* Result card */
.stw-coupon-result-card {
    margin-top: 16px;
    padding: 16px;
    background: #edfaef;
    border: 1px solid #46b450;
    border-radius: 4px;
}

.stw-coupon-result-card p:first-child {
    margin-top: 0;
}

.stw-coupon-code-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.stw-coupon-code-display code {
    font-size: 18px;
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #2271b1;
    border-radius: 4px;
    letter-spacing: 1px;
    font-weight: 600;
}

.stw-coupon-code-display .button {
    padding: 6px 16px;
    font-size: 13px;
}

/* Error card */
.stw-coupon-error-card {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fce4e4;
    border: 1px solid #d63638;
    border-radius: 4px;
    color: #8a1f1f;
}

/* Message cards (login/permission) */
.stw-coupon-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.stw-coupon-message-warning {
    background: #fff8e5;
    border: 1px solid #dba617;
    color: #6e4e00;
}

.stw-coupon-message-danger {
    background: #fce4e4;
    border: 1px solid #d63638;
    color: #8a1f1f;
}

.stw-coupon-message-info {
    background: #e7f5fe;
    border: 1px solid #72aee6;
    color: #1d4ed8;
}

/* EMS form styles (shared) */
.stw-ems-form-wrapper {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.stw-ems-form-wrapper h3 {
    margin-top: 0;
}

.stw-ems-method-fields {
    display: none;
    margin-top: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.stw-ems-method-fields.active {
    display: block;
}
