/**
 * Frontend styles for Iute Points Manager shortcode form
 */

.ipm-request-form-shortcode {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ipm-request-form-shortcode h2,
.ipm-request-form-shortcode h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #1d2327;
    font-weight: 600;
}

.ipm-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ipm-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ipm-label {
    font-weight: 500;
    color: #1d2327;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ipm-required {
    color: #d63638;
}

.ipm-input,
.ipm-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.ipm-input:focus,
.ipm-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.ipm-input:disabled,
.ipm-select:disabled {
    background-color: #f0f0f1;
    cursor: not-allowed;
    opacity: 0.6;
}

.ipm-description {
    margin: 0;
    font-size: 0.875rem;
    color: #646970;
    font-style: italic;
}

.ipm-form-group-submit {
    margin-top: 0.5rem;
}

.ipm-submit-button {
    position: relative;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: #2271b1;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, transform 0.1s ease-in-out;
    overflow: hidden;
}

.ipm-submit-button:hover:not(:disabled) {
    background-color: #135e96;
}

.ipm-submit-button:active:not(:disabled) {
    transform: translateY(1px);
}

.ipm-submit-button:disabled {
    background-color: #c3c4c7;
    cursor: not-allowed;
    opacity: 0.7;
}

.ipm-button-text {
    display: inline-block;
}

.ipm-button-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: ipm-spin 0.8s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.ipm-submit-button.is-loading .ipm-button-text {
    opacity: 0;
}

.ipm-submit-button.is-loading .ipm-button-spinner {
    display: block;
}

@keyframes ipm-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.ipm-form-response {
    margin-top: 1.5rem;
    min-height: 0;
}

.ipm-message {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.ipm-message p {
    margin: 0;
    font-size: 0.95rem;
}

.ipm-message-warning {
    background-color: #fff3cd;
    border-left-color: #dba617;
    color: #856404;
}

.ipm-message-info {
    background-color: #d1ecf1;
    border-left-color: #0c5460;
    color: #0c5460;
}

.ipm-message-success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.ipm-message-error {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.ipm-shortcode-login-wrapper {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.ipm-shortcode-login-form h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1d2327;
}

.ipm-shortcode-login-form p {
    margin-bottom: 1rem;
    color: #646970;
}

.ipm-login-button {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    background-color: #2271b1;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.15s ease-in-out;
}

.ipm-login-button:hover {
    background-color: #135e96;
    color: #ffffff;
}

/* Responsive design */
@media (max-width: 768px) {
    .ipm-request-form-shortcode {
        padding: 1.5rem;
        margin: 1rem;
    }
}

