/*
Theme Name: InterWorks Forms
Theme URI: https://forms.interworks.com
Description: Custom child theme for InterWorks Forms
Author: InterWorks
Author URI: https://interworks.com
Template: twentytwentyone
Version: 1.0.9
*/

/* Reset and base styles */
body.custom-homepage {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Dark background when logged out */
body.custom-homepage.logged-out {
    background-color: #1a1a1a;
}

/* White background when logged in */
body.custom-homepage.logged-in {
    background-color: #f5f5f5;
}
body.custom-homepage.error404 {
    background-color: #1a1a1a;
}

.custom-homepage .site-header,
.custom-homepage .site-footer,
.custom-homepage #page {
    display: none;
}

/* Main container */
.homepage-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* welcome screen typography */
h1.gform-conversational__welcome-title {
	font-size:56px !important; 
}
p.gform-conversational__welcome-message-copy {
	font-size:28px !important;
}

/* input typography */
legend.gfield_label.gform-field-label{
	font-size:28px !important;
}
.gfield_description {
	font-size:20px !important;
}

/* image select grid */
.img_grid_2col .gfield_radio {
	grid-template-columns: repeat(2, 1fr) !important;
}
.img_grid_3col .gfield_radio {
	grid-template-columns: repeat(3, 1fr) !important;
}

/* logo placement adjustment */
.gform-conversational__logo-wrap {
	margin-left:50px;
}

/* Header - Always Dark */
.homepage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
}

.homepage-logo img {
    height: 25px;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    border: none;
}

.header-btn-logout {
    background-color: #6633ff;
    color: #fff;
    border: 1px solid #6633ff;
    transition: 0.2s all opacity;
}

.header-btn-logout:hover {
    color: #ffffff;
    opacity: 0.85;
}

/* Main content area */
.homepage-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.homepage-content {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.homepage-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 40px;
}

/* Login buttons - centered on page */
.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.login-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    border: none;
    text-align: center;
    box-sizing: border-box;
}

.login-btn:hover {
    opacity: 0.9;
}

.login-btn-sso {
    background-color: #ffffff;
    color: #1a1a1a;
}

.login-btn-email {
    background-color: #6633ff;
    color: #ffffff;
}

/* Email login form (hidden by default) */
.email-login-wrapper {
    display: none !important;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.email-login-wrapper.active {
    display: block !important;
}

.email-login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.email-login-form input[type="text"]:focus,
.email-login-form input[type="password"]:focus {
    outline: none;
    border-color: #6633ff;
    color: #fff;
}

.email-login-form input[type="text"]::placeholder,
.email-login-form input[type="password"]::placeholder {
    color: #888;
}

.email-login-form input[type="text"],
.email-login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid #444;
    border-radius: 6px;
    background-color: #2a2a2a;
    color: #ffffff;
    box-sizing: border-box;
}

.email-login-form input[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 500;
    background-color: #6366f1;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.email-login-form input[type="submit"]:hover {
    background-color: #6633ff;
    opacity: 0.9;
    color: #fff;
}

.sso-link {
    margin-top: 20px;
    text-align: center;
}

.sso-text-btn {
    background: none;
    border: none;
    color: #6633ff;
    cursor: pointer;
    font-size: 14px;
}

.sso-text-btn:hover {
    text-decoration: underline;
}

.back-to-options {
    margin-top: 20px;
    text-align: center;
}

.back-to-options button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 14px;
}

.back-to-options button:hover {
    color: #ffffff;
}

.login-error {
    background-color: #ff4444;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Logged in - Forms list */
.forms-wrapper {
    width: 100%;
    max-width: 900px;
}

.forms-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.forms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.forms-title {
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.add-form-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #6633ff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.add-form-btn:hover {
    opacity: 0.9;
    color: #ffffff;
}

/* Sorting dropdown */
.forms-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.sort-label {
    color: #999;
    font-size: 12px;
    position: relative;
    top: 5px;
}

.sort-select {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}

.sort-select:hover {
    border-color: #6633ff;
}

.sort-select:focus {
    border-color: #6633ff;
    box-shadow: 0 0 0 2px rgba(102, 51, 255, 0.1);
}

.forms-list {
    display: flex;
    flex-direction: column;
}

.form-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.form-item:last-child {
    border-bottom: none;
}

.form-name {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}

.form-name:hover {
    color: #6633ff;
}

.form-id {
    color: #999;
    font-size: 12px;
    margin-left: 10px;
}

.form-actions {
    display: flex;
    gap: 20px;
}

.form-actions a {
    color: #6633ff;
    text-decoration: none;
    font-size: 14px;
}

.form-actions a:hover {
    text-decoration: underline;
}

.no-forms {
    color: #666;
    text-align: center;
    padding: 40px 20px;
}

/* Footer */
.homepage-footer {
    padding: 20px;
    text-align: center;
    font-size: 12px;
}

.logged-out .homepage-footer {
    color: #666;
}

.logged-out .homepage-footer a {
    color: #6633ff;
    text-decoration: none;
}

/* 404 Page */
.error-404 .homepage-main {
    text-align: center;
}

.error-title {
    font-size: 120px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    line-height: 1;
}

.error-tagline {
    font-size: 18px;
    color: #888;
    margin: 0 0 40px 0;
}

.error-home-btn {
    display: inline-block;
    padding: 14px 28px;
    background-color: #6633ff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.error-home-btn:hover {
    opacity: 0.9;
    color: #ffffff;
}

/* Responsive */
@media (max-width: 600px) {
    .homepage-header {
        padding: 15px 20px;
    }
    
    .form-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .form-actions {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .forms-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .error-title {
        font-size: 80px;
    }
}