/**
 * NameCheckup Frontend Styles
 * WordPress Plugin Frontend CSS
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.namecheckup-search-container,
.namecheckup-suggest-container,
.namecheckup-contact-container,
.namecheckup-results-display {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header Styles */
.namecheckup-header,
.suggest-header,
.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.namecheckup-title,
.suggest-title,
.contact-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 15px;
}

.namecheckup-description,
.suggest-description,
.contact-description {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 0;
}

/* ==========================================================================
   Search Form Styles
   ========================================================================== */

.namecheckup-search-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 40px;
}

.search-input-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}

#namecheckup-search-input,
#suggest-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

#namecheckup-search-input:focus,
#suggest-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-button,
.suggest-button,
.submit-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.search-button:hover,
.suggest-button:hover,
.submit-button:hover {
    background: linear-gradient(135deg, #2980b9, #1f5582);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.secondary-button {
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.secondary-button:hover {
    background: #d5dbdb;
    border-color: #95a5a6;
}

/* Search Options */
.search-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #2c3e50;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3498db;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.loading-container,
.loading-overlay {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-spinner i {
    font-size: 2rem;
    color: #3498db;
}

.loading-text {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* ==========================================================================
   Results Styles
   ========================================================================== */

.results-container {
    margin-top: 40px;
}

.results-section {
    margin-bottom: 40px;
}

.results-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-count {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: auto;
}

/* Platform Grid */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.platform-card {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.platform-card:hover {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.platform-card.available {
    border-color: #27ae60;
    background: #f8fff9;
}

.platform-card.taken {
    border-color: #e74c3c;
    background: #fff8f8;
}

.platform-card.error {
    border-color: #f39c12;
    background: #fffbf0;
}

.platform-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.platform-info {
    flex: 1;
}

.platform-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.platform-status {
    font-size: 0.9rem;
    font-weight: 500;
}

.platform-status.available {
    color: #27ae60;
}

.platform-status.taken {
    color: #e74c3c;
}

.platform-status.error {
    color: #f39c12;
}

.platform-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.platform-link {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.platform-link.register {
    background: #27ae60;
    color: white;
}

.platform-link.register:hover {
    background: #229954;
}

.platform-link.view {
    background: #3498db;
    color: white;
}

.platform-link.view:hover {
    background: #2980b9;
}

/* Domain Grid */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.domain-card {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.domain-card.available {
    border-color: #27ae60;
    background: #f8fff9;
}

.domain-card.taken {
    border-color: #e74c3c;
    background: #fff8f8;
}

.domain-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.domain-status {
    font-size: 0.9rem;
    font-weight: 500;
}

.domain-status.available {
    color: #27ae60;
}

.domain-status.taken {
    color: #e74c3c;
}

/* ==========================================================================
   Contact Form Styles
   ========================================================================== */

.contact-form-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group.half-width {
    flex: 1;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.required {
    color: #e74c3c;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.character-count {
    text-align: right;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 5px;
}

.character-count.warning {
    color: #f39c12;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

/* ==========================================================================
   Error and Success States
   ========================================================================== */

.error-container {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e74c3c;
}

.success-container {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.success-message {
    color: #27ae60;
}

.success-message h3 {
    margin-bottom: 10px;
    color: #27ae60;
}

/* ==========================================================================
   Suggestion Cards Styles
   ========================================================================== */

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.suggestion-card {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.suggestion-card:hover {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.suggestion-card.available {
    border-color: #27ae60;
    background: #f8fff9;
}

.suggestion-card.taken {
    border-color: #e74c3c;
    background: #fff8f8;
}

.suggestion-card.error {
    border-color: #f39c12;
    background: #fffbf0;
}

.suggestion-info {
    flex: 1;
}

.suggestion-domain {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

.suggestion-status {
    font-size: 0.9rem;
    font-weight: 500;
}

.suggestion-status.available {
    color: #27ae60;
}

.suggestion-status.taken {
    color: #e74c3c;
}

.suggestion-status.error {
    color: #f39c12;
}

.suggestion-price {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 3px;
}

.suggestion-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suggestion-check,
.register-button {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.suggestion-check {
    background: #3498db;
    color: white;
}

.suggestion-check:hover {
    background: #2980b9;
}

.suggestion-check:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.register-button {
    background: #27ae60;
    color: white;
}

.register-button:hover {
    background: #229954;
}

.button-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    border: 1px solid #e1e8ed;
    background: #f8f9fa;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button-small:hover {
    background: #e9ecef;
    border-color: #3498db;
    color: #3498db;
}

/* ==========================================================================
   TLD Selection Styles
   ========================================================================== */

.tlds-selection {
    margin: 15px 0;
}

.tlds-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.tld-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
}

.tld-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3498db;
}

.limit-selection {
    margin: 15px 0;
}

.limit-selection select {
    padding: 8px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    background: white;
    color: #2c3e50;
    cursor: pointer;
}

/* ==========================================================================
   Layout Controls
   ========================================================================== */

.layout-controls {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.layout-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid #e1e8ed;
    background: #f8f9fa;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.layout-toggle:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.layout-toggle.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Results Grid Layouts */
.results-grid.layout-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.results-grid.layout-list .platform-card {
    flex-direction: row;
    align-items: center;
    padding: 15px 20px;
}

.results-grid.layout-list .suggestion-card {
    flex-direction: row;
    align-items: center;
    padding: 15px 20px;
}

/* ==========================================================================
   Enhanced Form Styles
   ========================================================================== */

.suggest-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

.results-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e8ed;
}

.results-header h3 {
    margin: 0;
    color: #2c3e50;
}

/* ==========================================================================
   Animation Classes
   ========================================================================== */

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .namecheckup-title,
    .suggest-title,
    .contact-title {
        font-size: 2rem;
    }

    .namecheckup-search-form,
    .contact-form-wrapper {
        padding: 25px;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .search-options {
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .domain-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .namecheckup-search-container,
    .namecheckup-suggest-container,
    .namecheckup-contact-container,
    .namecheckup-results-display {
        padding: 15px;
    }

    .namecheckup-title,
    .suggest-title,
    .contact-title {
        font-size: 1.75rem;
    }

    .search-button,
    .suggest-button,
    .submit-button {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   Domain Result Highlighting Styles
   ========================================================================== */

.single_d_name {
    width: 10.93%;
    background-color: rgba(7, 7, 9, 0.4);
    color: #fff;
    font-weight: 400;
    font-size: 20px;
    line-height: 24px;
    margin-right: 2px;
    margin-bottom: 2px;
    transition: all 0.5s;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    text-decoration: none;
    cursor: pointer;
}

.single_d_name a {
    color: #fff;
    font-weight: 400;
    font-size: 20px;
    line-height: 24px;
    display: flex;
    width: 100%;
    height: 100%;
    text-align: center;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.single_d_name:hover {
    opacity: 0.6;
}

.single_d_name.available {
    background-color: #32a852;
}

.single_d_name.available:hover {
    background-color: #198135;
}

.single_d_name.taken {
    background-color: #E8D3D3;
    color: #333;
}

.single_d_name.taken a {
    color: #333;
}

.single_d_name.taken:hover {
    background-color: rgb(202, 170, 170);
}

.single_d_name.invalid {
    background-color: #E8D3D3;
    color: #333;
}

.single_d_name.invalid a {
    color: #333;
}

.single_d_name.invalid:hover {
    background-color: rgb(202, 170, 170);
}

.single_d_name.error {
    background-color: #dc3545;
}

.single_d_name.error:hover {
    background-color: #c82333;
}

/* Mobile responsive styles for domain grid */
@media (max-width: 767px) {
    .single_d_name {
        width: 123px;
        font-size: 16px;
        height: 48px;
    }
}

@media (max-width: 400px) {
    .single_d_name {
        width: 30.33%;
        font-size: 14px;
    }
}

@media only screen and (min-width:768px) and (max-width:992px) {
    .single_d_name {
        width: 113px;
    }
}

@media only screen and (min-width:992px) and (max-width:1200px) {
    .single_d_name {
        width: 111px;
    }
}

/* ==========================================================================
   Username/Platform Result Highlighting Styles
   ========================================================================== */

.single_username_list {
    background-color: rgba(7, 7, 9, 0.4);
    color: #fff;
    margin-right: 2px;
    margin-bottom: 2px;
    transition: all 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    cursor: pointer;
    border-radius: 4px;
}

.single_username_list a {
    color: #fff;
    display: flex;
    width: 100%;
    height: 100%;
    text-align: center;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 10px;
}

.single_username_list:hover {
    opacity: 0.8;
}

.single_username_list.available {
    background-color: #32a852;
}

.single_username_list.available a {
    color: #fff;
}

.single_username_list.available:hover {
    background-color: #198135;
}

.single_username_list.taken {
    background-color: #E8D3D3;
    color: #333;
}

.single_username_list.taken a {
    color: #333;
}

.single_username_list.taken:hover {
    background-color: rgb(202, 170, 170);
}

.single_username_list.invalid {
    background-color: #E8D3D3;
    color: #333;
}

.single_username_list.invalid a {
    color: #333;
}

.single_username_list.invalid:hover {
    background-color: rgb(202, 170, 170);
}

.single_username_list.error {
    background-color: #dc3545;
}

.single_username_list.error a {
    color: #fff;
}

.single_username_list.error:hover {
    background-color: #c82333;
}
