/**
 * OrdinalNews Form Styles
 */

.ordinalnews-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 8px;
    color: #ffffff;
}

.ordinalnews-form {
    display: flex;
    flex-direction: column;
}

.ordinalnews-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ordinalnews-form-field label {
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
}

/* Required field indicator */
.required-field {
    color: #ff7a00;
    margin-left: 4px;
}

/* Custom input class to ensure proper border-radius */
.ordinalnews-input {
    border-radius: 8px !important;
    -webkit-border-radius: 8px !important;
    -moz-border-radius: 8px !important;
}

.ordinalnews-form-field input,
.ordinalnews-form-field select,
.ordinalnews-form-field textarea {
    padding: 12px 15px;
    border: 2px solid #2c2f34;
    background-color: transparent;
    font-size: 16px;
    transition: all 0.3s ease;
    max-width: 100%;
    width: 100%;
}

.ordinalnews-form-field textarea {
    height: 200px;
    resize: vertical;
}

/* TBA Option styles */
.ordinalnews-tba-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.tba-checkbox {
    margin-right: 6px !important;
    cursor: pointer;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    padding: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #1f2024 !important;
    border: 2px solid #2c2f34 !important;
    border-radius: 3px !important;
}

.tba-checkbox:checked {
    background-color: #ff7a00 !important;
}

.tba-checkbox:checked::after {
    content: '\2714';
    color: white;
    position: absolute;
    font-size: 14px;
    top: 0;
    left: 3px;
    line-height: 1.3;
}

/* General checkbox styling */
input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #1f2024;
    border: 2px solid #2c2f34;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    padding: 0 !important;
    width: 20px !important;
    height: 20px !important;
}

input[type="checkbox"]:checked {
    background-color: #ff7a00;
}

input[type="checkbox"]:checked::after {
    content: '\2714';
    color: white;
    position: absolute;
    font-size: 14px;
    top: 0;
    left: 3px;
    line-height: 1.3;
}

.tba-label {
    font-size: 14px !important;
    cursor: pointer;
}

/* File Upload Styles */
.ordinalnews-file-upload-container {
    width: 100%;
    margin-top: 5px;
}

.ordinalnews-file-upload-area {
    border: 2px dashed #2c2f34;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    position: relative;
    background-color: #21222636;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.ordinalnews-file-upload-area:hover {
    border-color: #ff7a00;
}

.ordinalnews-file-upload-placeholder {
    width: 100%;
}

.ordinalnews-file-upload-placeholder p {
    margin: 8px 0;
    color: #ffffff;
    font-size: 16px;
}

.ordinalnews-file-types {
    color: #888 !important;
    font-size: 14px !important;
}

.ordinalnews-browse-text {
    color: #ff7a00;
    text-decoration: underline;
    cursor: pointer;
}

.ordinalnews-file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

/* File Preview Styles */
.ordinalnews-file-upload-preview {
    width: 100%;
    padding: 10px;
}

.ordinalnews-file-preview-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ordinalnews-file-name {
    font-weight: bold;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 60%;
}

.ordinalnews-file-size {
    color: #888;
    font-size: 14px;
}

.ordinalnews-file-preview-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 20;
}

.ordinalnews-upload-status {
    color: #27ae60;
    font-size: 14px;
    font-weight: bold;
}

.ordinalnews-remove-file {
    border: none;
    background: #444;
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    padding: 0;
    position: relative;
    z-index: 100;
    margin-left: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ordinalnews-remove-file:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

.ordinalnews-file-preview-image {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

.ordinalnews-file-preview-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    object-fit: contain;
}

/* Custom Select Dropdown Styles */
.ordinalnews-custom-select {
    position: relative;
    width: 100%;
}

.ordinalnews-select-trigger {
    padding: 12px 15px;
    border: 2px solid #2c2f34;
    background-color: transparent;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 51.2px;
    box-sizing: border-box;
}

.ordinalnews-select-trigger.active {
    border-color: #ff7a00;
    box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.2);
}

.ordinalnews-select-text {
    color: #ffffff;
    flex: 1;
}

.ordinalnews-select-arrow {
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
    transition: transform 0.3s ease;
}

.ordinalnews-select-trigger.active .ordinalnews-select-arrow {
    transform: rotate(180deg);
}

.ordinalnews-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #2c2f34;
    border: 2px solid #2c2f34;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.ordinalnews-select-options.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ordinalnews-select-option {
    padding: 12px 15px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 16px;
}

.ordinalnews-select-option:hover {
    background-color: #ff7a00;
}

.ordinalnews-select-option:last-child {
    border-radius: 0 0 6px 6px;
}

/* Timezone specific styling */
.ordinalnews-datetime-field .ordinalnews-custom-select {
    width: 100%;
    min-width: 80px;
}

.ordinalnews-datetime-field .ordinalnews-select-trigger {
    min-height: 51.2px;
    padding: 12px 10px;
    font-size: 14px;
}

.ordinalnews-datetime-field .ordinalnews-select-options {
    max-height: 150px;
}

.ordinalnews-datetime-field .ordinalnews-select-option {
    padding: 8px 10px;
    font-size: 14px;
}

.ordinalnews-form-field input:focus,
.ordinalnews-form-field select:focus,
.ordinalnews-form-field textarea:focus {
    border-color: #ff7a00;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.2);
}

.ordinalnews-form-error {
    color: #ff4d4d;
    font-size: 14px;
    min-height: 20px;
}

.ordinalnews-form-submit {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.ordinalnews-form-button {
    padding: 12px 24px;
    background-color: #ff7a00;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 46px;
}

.ordinalnews-form-button:hover {
    background-color: #e66f00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.ordinalnews-form-response {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    display: none;
}

.ordinalnews-form-response.success {
    background-color: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid #27ae60;
    display: block;
}

.ordinalnews-form-response.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    display: block;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .ordinalnews-form-container {
        padding: 20px;
    }
    
    .ordinalnews-form-field input,
    .ordinalnews-form-field select,
    .ordinalnews-form-field textarea {
        padding: 10px 12px;
        height: 42px;
    }
    
    .ordinalnews-form-field select {
        height: 50px;
    }
    
    .ordinalnews-form-field textarea {
        height: 150px;
    }
    
    .ordinalnews-form-button {
        width: auto;
        height: 42px;
    }
    
    /* Custom select responsive styles */
    .ordinalnews-select-trigger {
        padding: 10px 12px;
        min-height: 42px;
    }
    
    .ordinalnews-select-option {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* Timezone responsive styles */
    .ordinalnews-datetime-field .ordinalnews-select-trigger {
        min-height: 42px;
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .ordinalnews-datetime-field .ordinalnews-select-option {
        padding: 8px;
        font-size: 13px;
    }
}

/* Listing Type Cards Styles */
.ordinalnews-listing-type-cards {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    width: 100%;
}

.ordinalnews-listing-card {
    flex: 1;
    border: 2px solid #2c2f34;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #242526;
}

.ordinalnews-listing-card:hover {
    border-color: #ff7a00;
    box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.2);
    transform: translateY(-5px);
}

.ordinalnews-listing-card.active {
    border-color: #ff7a00;
    box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.2);
}

.ordinalnews-listing-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ordinalnews-listing-label {
    display: block;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ordinalnews-listing-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ffffff;
}

.ordinalnews-listing-card.active .ordinalnews-listing-title {
    color: #ff7a00;
}

.ordinalnews-listing-description {
    font-size: 14px;
    color: #cccccc;
}

/* Remove background color change when selecting */
.ordinalnews-listing-input:checked + .ordinalnews-listing-label {
    background-color: transparent;
}

/* Add consistent orange title for active card */
.ordinalnews-listing-input:checked + .ordinalnews-listing-label .ordinalnews-listing-title {
    color: #ff7a00;
}

/* Remove specific styling for free/premium cards to make them look consistent */
.ordinalnews-listing-card[data-value="free"],
.ordinalnews-listing-card[data-value="premium"] {
    border-color: #2c2f34;
}

.ordinalnews-listing-card[data-value="free"].active,
.ordinalnews-listing-card[data-value="premium"].active {
    border-color: #ff7a00;
}

.ordinalnews-listing-card.active .ordinalnews-listing-title {
    color: #ff7a00;
}

/* Date and Time Container Styles */
.ordinalnews-datetime-container {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}

.ordinalnews-datetime-field {
    flex: 1;
    min-width: 120px;
}

.ordinalnews-date-input,
.ordinalnews-time-input {
    width: 100%;
    color-scheme: dark !important;
    position: relative;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.ordinalnews-timezone-input,
.ordinalnews-timezone-offset-input {
    width: 100%;
}

@media screen and (max-width: 768px) {
    .ordinalnews-datetime-field {
        flex: 1 0 calc(50% - 5px);
    }
}

@media screen and (max-width: 480px) {
    .ordinalnews-datetime-field {
        flex: 1 0 100%;
    }
}

/* Responsive styles for mobile devices */
@media screen and (max-width: 425px) {
    .ordinalnews-listing-type-cards {
        flex-direction: column;
        gap: 15px;
    }
    
    .ordinalnews-listing-card {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .ordinalnews-listing-title {
        font-size: 20px;
    }
    
    .ordinalnews-listing-label {
        padding: 15px;
    }
}

/* Date and Time Input Styling */
.ordinalnews-date-input,
.ordinalnews-time-input {
    color-scheme: dark !important;
    position: relative;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* Reset default calendar and time picker icons */

/* Firefox specific fixes */
@-moz-document url-prefix() {
    input[type="date"].ordinalnews-input,
    input[type="time"].ordinalnews-input {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: calc(100% - 10px) center !important;
        background-size: 20px !important;
    }
    
    input[type="time"].ordinalnews-input {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E") !important;
    }
}

/* Edge and IE fixes */
@supports (-ms-ime-align:auto) {
    input[type="date"].ordinalnews-input,
    input[type="time"].ordinalnews-input {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: calc(100% - 10px) center !important;
        background-size: 20px !important;
    }
    
    input[type="time"].ordinalnews-input {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E") !important;
    }
}

/* Safari fixes */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) {
        input[type="date"].ordinalnews-input,
        input[type="time"].ordinalnews-input {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") !important;
            background-repeat: no-repeat !important;
            background-position: calc(100% - 10px) center !important;
            background-size: 20px !important;
        }
        
        input[type="time"].ordinalnews-input {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E") !important;
        }
    }
}

/* Info icon styles */
.premium-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    background-color: #ffffff;
    color: #ff7a00;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
    cursor: help;
    position: relative;
    font-style: italic;
    vertical-align: middle;
}

/* Premium info tooltip container - Improved positioning for all screen sizes */
#premium-tooltip-container {
    position: absolute;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: normal;
    white-space: normal;
    width: 280px;
    max-width: 90vw;
    text-align: center;
    font-style: normal;
    pointer-events: none;
    line-height: 1.5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

/* Tooltip arrow (pointing left - default) */
#premium-tooltip-container:after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-width: 10px;
    border-style: solid;
    left: -20px;
    top: 15px;
    border-color: transparent rgba(0, 0, 0, 0.9) transparent transparent;
}

/* Tooltip arrow pointing right (when tooltip is on the left side) */
#premium-tooltip-container.arrow-right:after {
    left: auto;
    right: -20px;
    border-color: transparent transparent transparent rgba(0, 0, 0, 0.9);
}

/* When tooltip is visible */
#premium-tooltip-container.visible {
    opacity: 1;
    visibility: visible;
} 