/**
 * Tech Tip Submission Modal Styles
 *
 * @package hvacrschool
 */

/* tech-tip-submit-form: match subscribe-form section structure and styling */
.tech-tip-submit-form {
    padding-top: 40px;
    margin-top: 0;
    padding-bottom: 50px;
    text-align: center;
    background-color: #1BB9D1;
    color: #fff;
    max-width: none;
}

.tech-tip-submit-form .wrapper {
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.tech-tip-submit-form h3,
.tech-tip-submit-form .slogan {
    color: #fff;
}

.tech-tip-submit-form h3 {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

.tech-tip-submit-form .slogan {
    width: 80%;
    margin: 0 auto 20px;
}

.tech-tip-submit-form .form-row {
    margin-top: 40px;
    margin-bottom: 10px;
}

.tech-tip-submit-form .form-row .tech-tip-submit-btn-cta {
    width: 100%;
    font-size: 24px;
    font-weight: 500;
    line-height: normal;
    padding: 12px 24px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #1BB9D1;
    border: 2px solid #fff;
    border-radius: 4px;
    transition-duration: 0.25s;
    text-decoration: none;
}

.tech-tip-submit-form .form-row .tech-tip-submit-btn-cta:hover {
    background-color: #1BB9D1;
    color: #fff !important;
    border: 2px solid #fff;
    text-decoration: none;
}

@media (min-width: 768px) {
    .tech-tip-submit-form .wrapper {
        width: 50%;
        padding-left: 0;
        padding-right: 0;
    }

    .tech-tip-submit-form .form-row {
        margin-bottom: 14px;
    }
}

@media (min-width: 1024px) {
    .tech-tip-submit-form h3 {
        font-size: 40px;
    }

    .tech-tip-submit-form .slogan {
        font-size: 18px;
        line-height: 120%;
    }
}

@media (min-width: 1400px) {
    .tech-tip-submit-form .wrapper {
        width: 40%;
    }
}

/* Archive tech tips page: mobile overrides */

@media (max-width: 767px) {
    .page-template-archive-tech-tips .tech-tip-submit-form {
        padding-top: 15px;
        padding-bottom: 15px;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .page-template-archive-tech-tips .tech-tip-submit-form .wrapper {
        max-width: 310px;
    }

    .page-template-archive-tech-tips .tech-tip-submit-form h3 {
        font-size: 20px;
        font-weight: 600;
        line-height: 30px;
    }

    .page-template-archive-tech-tips .tech-tip-submit-form .slogan {
        font-size: 10px;
        margin-bottom: 15px;
    }

    .page-template-archive-tech-tips .tech-tip-submit-form .form-row {
        margin-top: 25px;
    }

    .page-template-archive-tech-tips .tech-tip-submit-form .form-row .tech-tip-submit-btn-cta {
        font-size: 16px;
        padding: 9px 0;
    }
}

.tech-tip-submit-btn-cta {
    display: inline-block;
    padding: 12px 24px;
    background: #001a45;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.tech-tip-submit-btn-cta:hover {
    background: #0ab1d6;
    color: #fff;
}

.tech-tip-submission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.tech-tip-submission-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tech-tip-submission-modal {
    display: flex;
    flex-direction: column;
    background: #fff;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.tech-tip-submission-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.tech-tip-submission-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.tech-tip-submission-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #333;
}

.tech-tip-submission-close:hover {
    color: #0ab1d6;
}

.tech-tip-submission-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.tech-tip-submission-form {
    padding: 1.5rem;
}

.tech-tip-form-section {
    margin-bottom: 1.5rem;
}

.tech-tip-form-section h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: #001a45;
}

.tech-tip-form-row {
    margin-bottom: 1rem;
}

.tech-tip-form-row label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.tech-tip-form-row .required {
    color: #c00;
}

.tech-tip-form-row .optional {
    font-weight: normal;
    color: #666;
}

.tech-tip-form-row input[type="text"],
.tech-tip-form-row input[type="email"],
.tech-tip-form-row textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.tech-tip-form-row input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

.tech-tip-form-row input:focus,
.tech-tip-form-row textarea:focus {
    outline: none;
    border-color: #0ab1d6;
}

.tech-tip-file-hint {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.tech-tip-file-preview {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #333;
}

.tech-tip-supporting-revision-hint,
.tech-tip-docx-revision-hint {
    margin-top: 0.25rem;
    color: #0ab1d6;
}

.tech-tip-file-preview .file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid #eee;
}

.tech-tip-file-preview .file-item .remove-file {
    background: none;
    border: none;
    color: #c00;
    cursor: pointer;
    font-size: 0.85rem;
}

.tech-tip-char-count {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.tech-tip-error {
    display: block;
    color: #c00;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.tech-tip-general-error {
    padding: 0.75rem;
    background: #fee;
    color: #c00;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.tech-tip-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.tech-tip-checkbox-label input {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.tech-tip-form-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.tech-tip-submit-btn {
    padding: 10px 24px;
    background: #001a45;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.tech-tip-submit-btn:hover {
    background: #0ab1d6;
}

.tech-tip-submission-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.tech-tip-submission-loading svg {
    animation: tech-tip-spin 1s linear infinite;
}

.tech-tip-submission-overlay.loading .tech-tip-submission-loading {
    display: flex;
}

@keyframes tech-tip-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
