import styled from 'styled-components';

const css = styled.div;

export default css<any>`
   user-select: none;
   margin-bottom: 15px;

   .text-primary {
      color: ${(props) => props.theme.primary} !important;
   }

   .input-title {
      font-weight: 600;
      text-transform: uppercase;
      padding-bottom: 3px;
      font-size: 13px;
      color: rgba(0, 0, 0, 0.8);

      &.focus {
         color: ${(props) => props.theme.primary};
      }
   }

   .calendar-input {
      padding: 7px 10px;
      display: flex;

      .date {
         font-size: 0.96rem;
         font-family: 'Poppins';
         font-weight: 600;
      }

      .calendar-icon {
         font-size: 14px;
         display: flex;
         align-content: center;
         align-items: center;
         font-size: 18px;
      }

      .time {
         font-size: 0.85rem;
         font-family: 'Poppins';
         font-weight: 600;
         color: #777;
      }
   }

   .input-border {
      display: flex;
      align-content: center;
      align-items: center;
      //border-radius: 4px;
      width: 100%;
      background: white;
      border: 2px solid rgba(0, 0, 0, 0.25);
      border-radius: 3px;
      color: #444;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;

      ${(props) =>
         props.themeInput === 'gray' &&
         `background: #eee;
            border-color: #eee;
        `}

      .prefix {
         flex: 0;
         vertical-align: middle;
         padding-left: 10px;
         min-height: 35px;
         height: 100%;
         color: ${(props) => props.theme.primary};
         align-self: center;
         display: flex;
         align-content: center;
         align-items: center;
         font-size: 18px;
      }

      .input {
         padding-left: 10px;
         font-size: 14px;
      }

      &.has-error {
         border-color: ${(props) => props.theme.red} !important;
      }
   }

   .error-input {
      color: ${(props) => props.theme.red};
      text-align: left;
      font-weight: 600;
      margin: 0px;
      padding: 0px;
      font-size: 13px;
      margin-top: 4px;
      margin-bottom: 10px;
   }

   .datepicker-popup {
      box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.2);
      display: table;
      padding: 10px;
      border-radius: 5px;
      position: absolute;
      z-index: 100;
      background: white;

      .month {
         .month-name {
            text-align: center;
            font-weight: 600;
            color: #6e7b8a;
            padding-top: 3px;
            padding-bottom: 10px;
         }

         .left {
            cursor: pointer;
            float: left;
            padding: 5px 8px;
         }

         .right {
            cursor: pointer;
            float: right;
            padding: 5px 8px;
         }
      }

      .weekName {
         width: 31px;
         display: inline-block;
         text-align: center;
         font-weight: 700;
         font-size: 12px;
         border-bottom: 1px solid #eee;
         padding-bottom: 8px;
         margin-bottom: 8px;
         color: #888;
      }

      .week {
         width: 100%;

         .day {
            width: 31px;
            height: 31px;
            line-height: 31px;
            display: inline-block;
            text-align: center;
            font-size: 13px;
            font-weight: 600;
            color: #555;
            font-family: 'Poppins';
            border-radius: 100%;
            transition: 0.2s all;

            &.today {
               color: ${(props) => props.theme.primary};
               border: 1px solid ${(props) => props.theme.primary};
               font-weight: 800;
            }

            &.other-month {
               opacity: 0.5;
            }

            &:hover {
               background: #eee;
               cursor: pointer;
               transition: 0.2s all;
            }

            &.select {
               background: ${(props) => props.theme.primary};
               color: white;
               opacity: 1;
            }
         }
      }
   }

   .timepicker {
      display: flex;
      flex-direction: row;
      vertical-align: middle;

      .input-border {
         margin: auto;
      }

      .division {
         padding: 5px;
         align-self: center;
         font-weight: 600;
      }

      input {
         padding: 7px 10px;
         width: 0px;
         border: none;
         flex: 1;
         text-align: center;
         font-family: 'Poppins';
         font-size: 14px;
         font-weight: 500;
      }
   }

   .plus {
      padding: 0px 5px;
      cursor: pointer;
   }

   .input-time {
      width: 40px;
      display: flex;
   }

   .actions {
      padding-top: 10px;
      .btn-cancel,
      .btn-apply {
         padding: 5px;
         font-weight: 600;
         display: inline-block;
         width: 50%;
         text-align: center;
         cursor: pointer;
      }

      .btn-cancel {
         color: #444;
      }

      .btn-apply {
         color: ${(props) => props.theme.primary};
      }
   }
`;
