/* Template Marketplace Forms Styles */

/* Form Container */
.template-trial-form-container,
.template-order-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Template Info Section */
.template-trial-info {
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.template-trial-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.template-trial-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.template-trial-details h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #2c3e50;
}

.template-trial-details p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.template-trial-features h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #2c3e50;
}

.template-trial-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.template-trial-features li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
    color: #444;
}

.template-trial-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

/* Form Wrapper */
.template-trial-form-wrapper {
    background: white;
    padding: 30px;
    border-radius: 8px;
}

.template-trial-form-wrapper h3 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #2c3e50;
    text-align: center;
}

.form-description {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Form Styles */
.template-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.required {
    color: #dc3545;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Subdomain Input */
.subdomain-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.subdomain-input-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.subdomain-input-wrapper input {
    border: none;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    margin: 0;
}

.subdomain-input-wrapper input:focus {
    border: none;
    box-shadow: none;
}

.subdomain-suffix {
    background: #f8f9fa;
    padding: 12px 15px;
    color: #666;
    font-weight: 500;
    border-left: 1px solid #e1e5e9;
    white-space: nowrap;
}

.subdomain-status {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
}

.subdomain-status.checking {
    color: #ffc107;
}

.subdomain-status.available {
    color: #28a745;
}

.subdomain-status.unavailable {
    color: #dc3545;
}

.subdomain-status.invalid {
    color: #dc3545;
}

/* Form Help Text */
.form-help {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Checkbox Group */
.checkbox-group {
    margin: 25px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #007bff;
    border-color: #007bff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label a {
    color: #007bff;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin: 30px 0 20px 0;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.btn-trial {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-trial:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.btn-trial:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loading {
    display: none;
}

.btn-trial.loading .btn-text {
    display: none;
}

.btn-trial.loading .btn-loading {
    display: inline;
}

/* Form Messages */
.form-messages {
    margin-top: 20px;
    text-align: center;
}

.form-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
}

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

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

.form-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Field Validation Messages */
.field-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

.field-success {
    color: #28a745;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

/* Loading States */
.form-loading {
    position: relative;
}

.form-loading:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .template-trial-form-container,
    .template-order-form-container {
        margin: 10px;
        padding: 15px;
    }
    
    .template-trial-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .template-trial-image {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .template-trial-form-wrapper {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .template-trial-features ul {
        grid-template-columns: 1fr;
    }
    
    .subdomain-input-wrapper {
        flex-direction: column;
    }
    
    .subdomain-suffix {
        border-left: none;
        border-top: 1px solid #e1e5e9;
        text-align: center;
        width: 100%;
    }
    
    .btn-large {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .template-trial-form-wrapper h3 {
        font-size: 24px;
    }
    
    .form-description {
        font-size: 14px;
    }
    
    .checkbox-label {
        font-size: 13px;
    }
    
    .btn-large {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* Animation for form submission */
@keyframes submitSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.form-submit-success {
    animation: submitSuccess 0.6s ease-in-out;
}

