/*
 * dialog-testemail.css
 *
 * Styles for Email Test dialog (full screen)
 */

.testemail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.testemail-modal-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

.testemail-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
}

.testemail-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.testemail-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.testemail-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.testemail-modal-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.testemail-form {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.testemail-form-group {
    margin-bottom: 20px;
}

.testemail-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.testemail-form-group input[type="text"],
.testemail-form-group input[type="number"],
.testemail-form-group input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #f9f9f9;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.testemail-form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.testemail-form-group textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #f9f9f9;
    resize: vertical;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.testemail-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.testemail-row {
    display: flex;
    gap: 20px;
}

.testemail-row .testemail-form-group {
    flex: 1;
}

.testemail-row .testemail-form-group.small {
    flex: 0 0 120px;
}

.testemail-button-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.testemail-button {
    padding: 12px 36px;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testemail-button-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.testemail-button-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.testemail-button-send:active {
    transform: translateY(0);
}

.testemail-button-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.testemail-button-cancel {
    background: #f0f0f0;
    color: #333;
}

.testemail-button-cancel:hover {
    background: #e0e0e0;
}

.testemail-status {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: center;
}

.testemail-status.hidden {
    display: none;
}

.testemail-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.testemail-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.testemail-status.sending {
    background: #e2e3ff;
    color: #3d3d9e;
    border: 1px solid #c5c6ff;
}

/* Spinner for sending state */
.testemail-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #3d3d9e;
    border-radius: 50%;
    border-top-color: transparent;
    animation: testemail-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Responsive styles */
@media (max-width: 768px) {
    .testemail-modal-dialog {
        border-radius: 0;
    }

    .testemail-modal-header {
        border-radius: 0;
        padding: 16px 20px;
    }

    .testemail-modal-header h2 {
        font-size: 1.3rem;
    }

    .testemail-modal-body {
        padding: 20px;
    }

    .testemail-row {
        flex-direction: column;
        gap: 0;
    }

    .testemail-row .testemail-form-group.small {
        flex: 1;
    }

    .testemail-button-container {
        flex-direction: column;
    }

    .testemail-button {
        width: 100%;
    }
}
